Previous: 6.11 mutex Up: 6.11 mutex Next: 6.12 getpass


6.11.1 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.


Previous: 6.11 mutex Up: 6.11 mutex Next: 6.12 getpass
Release 2.2.3, documentation updated on 30 May 2003.
See About this document... for information on suggesting changes.

AltStyle によって変換されたページ (->オリジナル) /