Monkey patch original current_thread _active
Monkey patch the original current_thread to use the up-to-date _active global variable. This solution is based on that documented at: https://github.com/eventlet/eventlet/issues/592 Change-Id: I95a8d8cf02a0cb923418c0b5655442b8d7bc6b08 Closes-Bug: #1863021
This commit is contained in:
parent
2143060833
commit
90146b62c7
|
@ -39,6 +39,13 @@ if os.name == 'nt':
|
|||
else:
|
||||
eventlet.patcher.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
|
||||
orig_threading.current_thread.__globals__['_active'] = threading._active
|
||||
|
||||
from oslo_reports import guru_meditation_report as gmr
|
||||
from oslo_utils import encodeutils
|
||||
|
||||
|
|
|
@ -39,6 +39,13 @@ if os.name == 'nt':
|
|||
else:
|
||||
eventlet.patcher.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
|
||||
orig_threading.current_thread.__globals__['_active'] = threading._active
|
||||
|
||||
from oslo_reports import guru_meditation_report as gmr
|
||||
from oslo_utils import encodeutils
|
||||
|
||||
|
|
|
@ -37,6 +37,13 @@ if os.name == 'nt':
|
|||
else:
|
||||
eventlet.patcher.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
|
||||
orig_threading.current_thread.__globals__['_active'] = threading._active
|
||||
|
||||
import subprocess
|
||||
|
||||
# If ../glance/__init__.py exists, add ../ to Python search path, so that
|
||||
|
|
Loading…
Reference in New Issue