2015-02-14 19:30:48 +00:00
|
|
|
``tornado.locks`` -- Synchronization primitives
|
|
|
|
===============================================
|
|
|
|
|
|
|
|
.. versionadded:: 4.2
|
|
|
|
|
2015-03-25 10:18:32 +00:00
|
|
|
Coordinate coroutines with synchronization primitives analogous to those the
|
|
|
|
standard library provides to threads.
|
|
|
|
|
|
|
|
*(Note that these primitives are not actually thread-safe and cannot be used in
|
|
|
|
place of those from the standard library--they are meant to coordinate Tornado
|
|
|
|
coroutines in a single-threaded app, not to protect shared objects in a
|
|
|
|
multithreaded app.)*
|
|
|
|
|
2015-03-26 10:31:57 +00:00
|
|
|
.. automodule:: tornado.locks
|
2015-03-25 10:18:32 +00:00
|
|
|
|
2015-03-26 10:31:57 +00:00
|
|
|
Condition
|
|
|
|
---------
|
|
|
|
.. autoclass:: Condition
|
|
|
|
:members:
|
2015-03-25 10:18:32 +00:00
|
|
|
|
2015-03-27 10:17:31 +00:00
|
|
|
Event
|
|
|
|
-----
|
|
|
|
.. autoclass:: Event
|
|
|
|
:members:
|
|
|
|
|
2015-03-31 02:41:05 +00:00
|
|
|
Semaphore
|
|
|
|
---------
|
|
|
|
.. autoclass:: Semaphore
|
|
|
|
:members:
|
|
|
|
|
2015-04-04 12:39:11 +00:00
|
|
|
BoundedSemaphore
|
|
|
|
----------------
|
|
|
|
.. autoclass:: BoundedSemaphore
|
|
|
|
:members:
|
|
|
|
:inherited-members:
|
2015-04-19 03:04:13 +00:00
|
|
|
|
|
|
|
Lock
|
|
|
|
----
|
|
|
|
.. autoclass:: Lock
|
|
|
|
:members:
|
|
|
|
:inherited-members:
|