0.5.1: fix stop()

This commit is contained in:
Victor Stinner
2016-02-22 17:23:39 +01:00
parent 9a9206cf85
commit 0afed1425f
4 changed files with 16 additions and 2 deletions

View File

@@ -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:

View File

@@ -1,6 +1,14 @@
Changelog
=========
2016-02-22: Version 0.5.1
-------------------------
* Fix EventLoop.stop() for the new semantics of stop() introduced
in Python 3.4.4 and Python 3.5.1. The method now writes into the self-pipe
to wake-up the event loop. Otherwise, the stop() may not be taken in account
immediatly, and even block forever.
2016-02-22: Version 0.5
-----------------------

View File

@@ -52,7 +52,7 @@ copyright = u'2014, Victor Stinner'
#
# The short X.Y version.
# The full version, including alpha/beta/rc tags.
version = release = '0.6'
version = release = '0.5.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -55,7 +55,7 @@ with open("README") as fp:
install_options = {
"name": "aioeventlet",
"version": "0.6",
"version": "0.5.1",
"license": "Apache License 2.0",
"author": 'Victor Stinner',
"author_email": 'victor.stinner@gmail.com',