GNU Info

Info Node: (librep.info)Mutexes

(librep.info)Mutexes


Next: Thread Implementation Notes Prev: Manipulating Threads Up: Threads
Enter node , (file) or (file)node

Mutual Exclusion Devices
------------------------

   "Mutexes" are lisp objects used to coordinate access to data shared
across multiple threads (where interleaved access would be bad). These
functions are exported by the `rep.threads.mutex' module (Note:
Modules).

 - Function: make-mutex
     Create and return a mutex object. No thread will own the new mutex.

 - Function: mutexp arg
     Return true if ARG is a mutex object.

 - Function: obtain-mutex mutex
     Obtain the mutex MUTEX for the current thread. Will suspend the
     current thread until the mutex is exclusively available.

 - Function: maybe-obtain-mutex mutex
     Attempt to obtain mutex MUTEX for the current thread without
     blocking. Returns true if able to obtain the mutex, false
     otherwise.

 - Function: release-mutex mutex
     Release the mutex object MUTEX (which must have previously been
     obtained by the current thread). Returns true if the mutex has no
     new owner.


automatically generated by info2www version 1.2.2.9