From 4650a2bf3b6a9c272f2bd39fd9511ed7d8265fc7 Mon Sep 17 00:00:00 2001 From: Gevorg Davoian Date: Tue, 9 Aug 2016 17:02:09 +0300 Subject: [PATCH] Eliminate unneccessary patching in GreenFuture Due to eventlet's bug eventlet.patcher.is_monkey_patched('threading') always returns False, so it is better to replace 'threading' with 'thread', which seems to work properly. Change-Id: I849e427c312e41b2d518a088e3f91c92d7574bd7 --- futurist/_futures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/futurist/_futures.py b/futurist/_futures.py index fc1905b..d3dd105 100644 --- a/futurist/_futures.py +++ b/futurist/_futures.py @@ -314,7 +314,7 @@ class GreenFuture(Future): # functions will correctly yield to eventlet. If this is not done then # waiting on the future never actually causes the greenthreads to run # and thus you wait for infinity. - if not _green.is_monkey_patched('threading'): + if not _green.is_monkey_patched('thread'): self._condition = _green.threading.condition_object()