Merge "Monkey patch original current_thread _active"
This commit is contained in:
commit
e82ff57b70
|
@ -22,6 +22,13 @@ import sys
|
||||||
|
|
||||||
import eventlet # noqa
|
import eventlet # noqa
|
||||||
eventlet.monkey_patch()
|
eventlet.monkey_patch()
|
||||||
|
# Monkey patch the original current_thread to use the up-to-date _active
|
||||||
|
# global variable. See https://bugs.launchpad.net/bugs/1863021 and
|
||||||
|
# https://github.com/eventlet/eventlet/issues/592
|
||||||
|
import __original_module_threading as orig_threading
|
||||||
|
import threading # noqa
|
||||||
|
orig_threading.current_thread.__globals__['_active'] = threading._active
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_reports import guru_meditation_report as gmr
|
from oslo_reports import guru_meditation_report as gmr
|
||||||
|
|
|
@ -26,6 +26,13 @@ import sys
|
||||||
# share the same context.
|
# share the same context.
|
||||||
import eventlet
|
import eventlet
|
||||||
eventlet.monkey_patch()
|
eventlet.monkey_patch()
|
||||||
|
# Monkey patch the original current_thread to use the up-to-date _active
|
||||||
|
# global variable. See https://bugs.launchpad.net/bugs/1863021 and
|
||||||
|
# https://github.com/eventlet/eventlet/issues/592
|
||||||
|
import __original_module_threading as orig_threading
|
||||||
|
import threading # noqa
|
||||||
|
orig_threading.current_thread.__globals__['_active'] = threading._active
|
||||||
|
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
|
@ -22,6 +22,13 @@ import sys
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
eventlet.monkey_patch()
|
eventlet.monkey_patch()
|
||||||
|
# Monkey patch the original current_thread to use the up-to-date _active
|
||||||
|
# global variable. See https://bugs.launchpad.net/bugs/1863021 and
|
||||||
|
# https://github.com/eventlet/eventlet/issues/592
|
||||||
|
import __original_module_threading as orig_threading
|
||||||
|
import threading # noqa
|
||||||
|
orig_threading.current_thread.__globals__['_active'] = threading._active
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_reports import guru_meditation_report as gmr
|
from oslo_reports import guru_meditation_report as gmr
|
||||||
|
|
|
@ -33,6 +33,13 @@ if os.name == 'nt':
|
||||||
eventlet.monkey_patch(os=False)
|
eventlet.monkey_patch(os=False)
|
||||||
else:
|
else:
|
||||||
eventlet.monkey_patch()
|
eventlet.monkey_patch()
|
||||||
|
# Monkey patch the original current_thread to use the up-to-date _active
|
||||||
|
# global variable. See https://bugs.launchpad.net/bugs/1863021 and
|
||||||
|
# https://github.com/eventlet/eventlet/issues/592
|
||||||
|
import __original_module_threading as orig_threading
|
||||||
|
import threading # noqa
|
||||||
|
orig_threading.current_thread.__globals__['_active'] = threading._active
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_privsep import priv_context
|
from oslo_privsep import priv_context
|
||||||
|
|
Loading…
Reference in New Issue