diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-11-19 14:17:42 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-11-19 14:17:42 +0100 |
commit | 5c16da690baddcf8e3fddf8aa789b68577f74332 (patch) | |
tree | 1432c6554bf82290593b7b5bd0e0524e58adf42b | |
parent | 5b93178ab50eb1047ee83111dc131707852d2156 (diff) | |
download | aioeventlet-5c16da690baddcf8e3fddf8aa789b68577f74332.tar.gz |
run_forever(): first ensure that _run_once() will not be called
-rw-r--r-- | aiogreen.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/aiogreen.py b/aiogreen.py index 5a00043..77bb0d9 100644 --- a/aiogreen.py +++ b/aiogreen.py @@ -354,8 +354,12 @@ class EventLoop(BaseEventLoop): # sleep until the stop() method is called stop_event.wait() finally: - self._stop_event = None + # First ensure that _run_once() will not be called self._scheduler.stop() + + # The event loop stopped + self._stop_event = None + # Stop the greenthread of the thread queue. # call_soon_threadsafe() can still be called, handles will be # stored in the thread queue. |