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: I0540923755ac3969b584eeba2e19c037a7f2c261 Story: 2007614
This commit is contained in:
parent
0e7d99ac3f
commit
8fd17214a9
|
@ -20,6 +20,12 @@ An OpenStack Heat server that can run all services.
|
|||
|
||||
import eventlet
|
||||
eventlet.monkey_patch(os=False)
|
||||
# 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
|
||||
|
||||
import sys
|
||||
|
||||
|
|
|
@ -20,6 +20,12 @@ An OpenStack ReST API to Heat.
|
|||
|
||||
import eventlet
|
||||
eventlet.monkey_patch(os=False)
|
||||
# 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
|
||||
|
||||
import sys
|
||||
|
||||
|
|
|
@ -22,6 +22,12 @@ AMQP RPC to implement them.
|
|||
|
||||
import eventlet
|
||||
eventlet.monkey_patch(os=False)
|
||||
# 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
|
||||
|
||||
import sys
|
||||
|
||||
|
|
|
@ -22,6 +22,12 @@ engine.
|
|||
|
||||
import eventlet
|
||||
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
|
||||
|
||||
import sys
|
||||
|
||||
|
|
Loading…
Reference in New Issue