Skip to content

Commit 2deee96

Browse files
author
Corey Bryant
committed
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: eventlet/eventlet#592 Change-Id: I113aaefc33b4b10dd037fc2ef00fc5f507be8b22 Closes-Bug: #1863021
1 parent 7d6ef1f commit 2deee96

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

networking_mlnx/cmd/eventlet/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@
1313
import eventlet
1414

1515
eventlet.monkey_patch()
16+
# Monkey patch the original current_thread to use the up-to-date _active
17+
# global variable. See https://bugs.launchpad.net/bugs/1863021 and
18+
# https://github.com/eventlet/eventlet/issues/592
19+
import __original_module_threading as orig_threading # pylint: disable=C0413 # noqa
20+
import threading # pylint: disable=C0413 # noqa
21+
orig_threading.current_thread.__globals__['_active'] = threading._active

0 commit comments

Comments
 (0)