diff --git a/eventlet/green/threading.py b/eventlet/green/threading.py index 106f7d9..b2ce428 100644 --- a/eventlet/green/threading.py +++ b/eventlet/green/threading.py @@ -17,7 +17,7 @@ def _patch_main_thread(mod): # then the main thread will have the wrong key in therading._active, # so, we try and replace that key with the correct one here # this works best if there are no other threads besides the main one - curthread = mod._active.pop(mod.current_thread()._Thread__ident, None) + curthread = mod._active.pop(mod._get_ident(), None) if curthread: mod._active[thread.get_ident()] = curthread