DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(guile.info.gz) Arbiters

Info Catalog (guile.info.gz) Scheduling (guile.info.gz) Asyncs
 
 32.1 Arbiters
 =============
 
 Arbiters are synchronization objects.  They are created with
 `make-arbiter'.  Two or more threads can synchronize on an arbiter by
 trying to lock it using `try-arbiter'.  This call will succeed if no
 other thread has called `try-arbiter' on the arbiter yet, otherwise it
 will fail and return `#f'.  Once an arbiter is successfully locked, it
 cannot be locked by another thread until the thread holding the arbiter
 calls `release-arbiter' to unlock it.
 
  -- Scheme Procedure: make-arbiter name
  -- C Function: scm_make_arbiter (name)
      Return an object of type arbiter and name NAME. Its state is
      initially unlocked.  Arbiters are a way to achieve process
      synchronization.
 
  -- Scheme Procedure: try-arbiter arb
  -- C Function: scm_try_arbiter (arb)
      Return `#t' and lock the arbiter ARB if the arbiter was unlocked.
      Otherwise, return `#f'.
 
  -- Scheme Procedure: release-arbiter arb
  -- C Function: scm_release_arbiter (arb)
      Return `#t' and unlock the arbiter ARB if the arbiter was locked.
      Otherwise, return `#f'.
 
Info Catalog (guile.info.gz) Scheduling (guile.info.gz) Asyncs
automatically generated byinfo2html