mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
829ba2d88f
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
12 lines
626 B
Text
12 lines
626 B
Text
With Tornado’s gen module, you can turn Python generators into full-featured
|
||
coroutines, but coordination among these coroutines is difficult without
|
||
mutexes, semaphores, and queues.
|
||
|
||
Toro provides to Tornado coroutines a set of locking primitives and queues
|
||
analogous to those that Gevent provides to Greenlets, or that the standard
|
||
library provides to threads.
|
||
|
||
(Note that these primitives and queues 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 single-threaded apps, not to protect shared
|
||
objects in multithreaded apps.)
|