GNU Info

Info Node: (python2.1-lib.info)Mutex Objects

(python2.1-lib.info)Mutex Objects


Prev: mutex Up: mutex
Enter node , (file) or (file)node

Mutex Objects
-------------

`mutex' objects have following methods:

`test()'
     Check whether the mutex is locked.

`testandset()'
     "Atomic" test-and-set, grab the lock if it is not set, and return
     true, otherwise, return false.

`lock(function, argument)'
     Execute `FUNCTION(ARGUMENT)', unless the mutex is locked.  In the
     case it is locked, place the function and argument on the queue.
     See `unlock' for explanation of when `FUNCTION(ARGUMENT)' is
     executed in that case.

`unlock()'
     Unlock the mutex if queue is empty, otherwise execute the first
     element in the queue.


automatically generated by info2www version 1.2.2.9