Do not yield in threading mode
If a service runs in threading mode nova.utils.cooperative_yield is noop as yielding is only necessary for eventlet. Change-Id: I72a52262f5c501f77d23ed56cbcd1a9c2be72fa7 Signed-off-by: Balazs Gibizer <gibi@redhat.com>
This commit is contained in:
+4
-5
@@ -80,13 +80,12 @@ _SERVICE_TYPES = service_types.ServiceTypes()
|
||||
|
||||
DEFAULT_EXECUTOR = None
|
||||
|
||||
# TODO(ksambor) Make this a no-op in threading mode once a
|
||||
# threading-compatible service is available.Also, remove all
|
||||
# cooperative_yield calls after dropping Eventlet support.
|
||||
|
||||
|
||||
def cooperative_yield():
|
||||
time.sleep(0)
|
||||
# TODO(ksambor) Remove all cooperative_yield calls after dropping Eventlet
|
||||
# support.
|
||||
if not concurrency_mode_threading():
|
||||
time.sleep(0)
|
||||
|
||||
|
||||
def destroy_default_executor():
|
||||
|
||||
Reference in New Issue
Block a user