DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(guile.info.gz) Higher level thread procedures

Info Catalog (guile.info.gz) Low level thread primitives (guile.info.gz) Threads
 
 32.4.2 Higher level thread procedures
 -------------------------------------
 
 Higher level thread procedures are available by loading the `(ice-9
 threads)' module.  These provide standardized thread creation and mutex
 interaction.
 
  -- Scheme Procedure: %thread-handler tag args...
      This procedure is specified as the standard error-handler for
      `make-thread' and `begin-thread'.  If the number of ARGS is three
      or more, use `display-error', otherwise display a message
      "uncaught throw to TAG".  All output is sent to the port specified
      by `current-error-port'.
 
      Before display, global var `the-last-stack' is set to `#f' and
      signals are unmasked with `unmask-signals'.
 
      [FIXME: Why distinguish based on number of args?!  Cue voodoo
      music here.]
 
  -- macro: make-thread proc [args...]
      Apply PROC to ARGS in a new thread formed by
      `call-with-new-thread' using `%thread-handler' as the error
      handler.
 
  -- macro: begin-thread first [rest...]
      Evaluate forms FIRST and REST in a new thread formed by
      `call-with-new-thread' using `%thread-handler' as the error
      handler.
 
  -- macro: with-mutex m [body...]
      Lock mutex M, evaluate BODY, and then unlock M.  These
      sub-operations form the branches of a `dynamic-wind'.
 
  -- macro: monitor first [rest...]
      Evaluate forms FIRST and REST under a newly created anonymous
      mutex, using `with-mutex'.
 
      [FIXME: Is there any way to access the mutex?]
 
Info Catalog (guile.info.gz) Low level thread primitives (guile.info.gz) Threads
automatically generated byinfo2html