Merge "Monkey patch original current_thread _active"

This commit is contained in:
Zuul 2020-05-05 21:01:20 +00:00 committed by Gerrit Code Review
commit e82ff57b70
4 changed files with 28 additions and 0 deletions

View File

@ -22,6 +22,13 @@ import sys
import eventlet # noqa
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_log import log as logging
from oslo_reports import guru_meditation_report as gmr

View File

@ -26,6 +26,13 @@ import sys
# share the same context.
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
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -22,6 +22,13 @@ import sys
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
from oslo_config import cfg
from oslo_log import log as logging
from oslo_reports import guru_meditation_report as gmr

View File

@ -33,6 +33,13 @@ if os.name == 'nt':
eventlet.monkey_patch(os=False)
else:
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_log import log as logging
from oslo_privsep import priv_context