Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.08 KB

locks.rst

File metadata and controls

46 lines (36 loc) · 1.08 KB

tornado.locks -- Synchronization primitives

4.2

Coordinate coroutines with synchronization primitives analogous to those the standard library provides to threads. These classes are very similar to those provided in the standard library's asyncio package.

Warning

Note that these primitives are not actually thread-safe and cannot be used in place of those from the standard library's threading module--they are meant to coordinate Tornado coroutines in a single-threaded app, not to protect shared objects in a multithreaded app.

tornado.locks

Condition

Condition

Event

Event

Semaphore

Semaphore

BoundedSemaphore

BoundedSemaphore

Lock

Lock