summaryrefslogtreecommitdiff
path: root/aioeventlet.py
diff options
context:
space:
mode:
Diffstat (limited to 'aioeventlet.py')
-rw-r--r--aioeventlet.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/aioeventlet.py b/aioeventlet.py
index 9acba3d..7873544 100644
--- a/aioeventlet.py
+++ b/aioeventlet.py
@@ -206,6 +206,12 @@ class EventLoop(asyncio.SelectorEventLoop):
if eventlet.patcher.is_monkey_patched('thread'):
self._default_executor = _TpoolExecutor(self)
+ def stop(self):
+ super(EventLoop, self).stop()
+ # selector.select() is running: write into the self-pipe to wake up
+ # the selector
+ self._write_to_self()
+
def call_soon(self, callback, *args):
handle = super(EventLoop, self).call_soon(callback, *args)
if self._selector is not None and self._selector._event: