(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/module-mutex.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/module-mutex.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/module-Queue.html| ]]
|
Python Library Reference
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/contents.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/modindex.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/genindex.html| ]]
|
Previous: 7.6 mutex Up: 7.6 mutex Next: 7.7 Queue
7.6.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.
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/module-mutex.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/module-mutex.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/module-Queue.html| ]]
|
Python Library Reference
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/contents.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/modindex.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/lib/genindex.html| ]]
|
Previous: 7.6 mutex Up: 7.6 mutex Next: 7.7 Queue
See About this document... for information on suggesting changes.