/[guile]/guile/guile-core/doc/ref/scheme-scheduling.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/scheme-scheduling.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mvo, Mon Oct 7 16:34:28 2002 UTC revision 1.5 by mvo, Wed Oct 9 22:48:30 2002 UTC
# Line 57  arbiter was locked. Otherwise, return @c Line 57  arbiter was locked. Otherwise, return @c
57  @cindex user asyncs  @cindex user asyncs
58  @cindex system asyncs  @cindex system asyncs
59    
 @c FIXME::martin: Review me!  
   
60  Asyncs are a means of deferring the excution of Scheme code until it is  Asyncs are a means of deferring the excution of Scheme code until it is
61  safe to do so.  safe to do so.
62    
# Line 90  To cause the future asynchronous executi Line 88  To cause the future asynchronous executi
88  thread, use @code{system-async-mark}.  thread, use @code{system-async-mark}.
89    
90  Automatic invocation of system asyncs can be temporarily disabled by  Automatic invocation of system asyncs can be temporarily disabled by
91  calling @code{mask-signals} and @code{unmask-signals}.  Setting the mark  calling @code{call-with-blocked-asyncs}.  This function works by
92  while async execution is disabled will nevertheless cause the async to  temporarily increasing the @emph{async blocking level} of the current
93  run once execution is enabled again.  Please note that calls to these  thread while a given procedure is running.  The blocking level starts
94  procedures should always be paired, and they must not be nested, e.g. no  out at zero, and whenever a safe point is reached, a blocking level
95  @code{mask-signals} is allowed if another one is still active.  greater than zero will prevent the execution of queued asyncs.
96    
97    Analogously, the procedure @code{call-with-unblocked-asyncs} will
98    temporarily decrease the blocking level of the current thread.  You
99    can use it when you want to disable asyncs by default and only allow
100    them temporarily.
101    
102  @deffn {Scheme procedure} system-async-mark proc [thread]  @deffn {Scheme procedure} system-async-mark proc [thread]
103  @deffnx {C Function} scm_system_async_mark (proc)  @deffnx {C Function} scm_system_async_mark (proc)
# Line 110  This procedure is not safe to be called Line 113  This procedure is not safe to be called
113  signal handlers.  signal handlers.
114  @end deffn  @end deffn
115    
116  @deffn {Scheme Procedure} mask-signals  @deffn {Scheme Procedure} call-with-blocked-asyncs proc
117  @deffnx {C Function} scm_mask_signals ()  @deffnx {C Function} scm_call_with_blocked_asyncs (proc)
118  Mask signals. The returned value is not specified.  @deffnx {C Function} void *scm_c_call_with_blocked_asyncs (void *(*p) (void *d), void *d)
119    Call @var{proc} and block the execution of system asyncs by one level
120    for the current thread while it is running.  Return the value returned
121    by @var{proc}.  For the first two variants, call @var{proc} with no
122    arguments; for the third, call it with @var{data}.
123  @end deffn  @end deffn
124    
125  @deffn {Scheme Procedure} unmask-signals  @deffn {Scheme Procedure} call-with-unblocked-asyncs proc
126  @deffnx {C Function} scm_unmask_signals ()  @deffnx {C Function} scm_call_with_unblocked_asyncs (proc)
127  Unmask signals. The returned value is not specified.  @deffnx {C Function} void *scm_c_call_with_unblocked_asyncs (void *(*p) (void *d), void *d)
128    Call @var{proc} and unblock the execution of system asyncs by one
129    level for the current thread while it is running.  Return the value
130    returned by @var{proc}.  For the first two variants, call @var{proc}
131    with no arguments; for the third, call it with @var{data}.
132  @end deffn  @end deffn
133    
134  @node User asyncs  @node User asyncs

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26