diff options
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | aiogreen.py | 9 |
2 files changed, 10 insertions, 2 deletions
@@ -75,6 +75,9 @@ Version 0.2 (development version) * Fix EventLoop.stop(): don't stop immediatly, but schedule stopping the event loop with call_soon() * Add tox.ini to run tests with tox +* Setting debug mode of the event loop doesn't enable "debug_blocking" of + eventlet on Windows anymore, the feature is not implemented on Windows + in eventlet. 2014-11-19: version 0.1 ----------------------- diff --git a/aiogreen.py b/aiogreen.py index 829446b..5f722cf 100644 --- a/aiogreen.py +++ b/aiogreen.py @@ -190,8 +190,6 @@ class EventLoop(base_events.BaseEventLoop): # Store a reference to the hub to ensure # that we always use the same hub self._hub = eventlet.hubs.get_hub() - if self.get_debug(): - self._hub.debug_blocking = True self._ssock = None self._csock = None @@ -200,6 +198,13 @@ class EventLoop(base_events.BaseEventLoop): if eventlet.patcher.is_monkey_patched('thread'): self._default_executor = _TpoolExecutor(self) + def set_debug(self, debug): + super(EventLoop, self).set_debug(debug) + + # Detect blocking eventlet functions. The feature is implemented with + # signal.alarm() which is is not available on Windows. + self._hub.debug_blocking = debug and (sys.platform != 'win32') + def time(self): return self._hub.clock() |