doc: update threading.rst
There are two ways to give other greenthread chance to run: greenthread.sleep(0) or time.sleep(0). Add the second way in threading.rst and recommend the second way for contributors. Change-Id: I33dc73a0edfa5fde0e5fa8051a594874ab166970
This commit is contained in:
parent
415b221e33
commit
9885787db1
@ -31,7 +31,9 @@ delays in the case that there is only a single green thread::
|
|||||||
from eventlet import greenthread
|
from eventlet import greenthread
|
||||||
...
|
...
|
||||||
greenthread.sleep(0)
|
greenthread.sleep(0)
|
||||||
|
In current code, time.sleep(0)does the same thing as greenthread.sleep(0) if
|
||||||
|
time module is patched through eventlet.monkey_patch(). To be explicit, we recommend
|
||||||
|
contributors use ``greenthread.sleep()`` instead of ``time.sleep()``.
|
||||||
|
|
||||||
MySQL access and eventlet
|
MySQL access and eventlet
|
||||||
-------------------------
|
-------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user