[hacking] N374 do not use time.sleep(0) to yield
We have a centralized nova.utils.cooperative_yield() instead of time.sleep(0). It is better as it allows to turn off the sleep calls when the service runs in threaded mode. Change-Id: I625daec79ee5b7f8b92116f450e21f997cef0546 Signed-off-by: Balazs Gibizer <gibi@redhat.com>
This commit is contained in:
@@ -79,6 +79,8 @@ Nova Specific Commandments
|
||||
- [N372] Don't use the setDaemon method. Use the daemon attribute instead.
|
||||
- [N373] Don't use eventlet specific concurrency primitives. Use the one
|
||||
from stdlib instead. E.g. eventlet.sleep => time.sleep
|
||||
- [N374] Don't use time.sleep(0) to trigger eventlet yielding.
|
||||
Use nova.utils.cooperative_yield() instead.
|
||||
|
||||
Creating Unit Tests
|
||||
-------------------
|
||||
|
||||
Reference in New Issue
Block a user