Merge pull request #111 from meejah/sleep-future

Sleep future
This commit is contained in:
Tobias Oberstein
2017-07-21 08:25:59 +02:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -1,6 +1,12 @@
txio releases
=============
unreleased
----------
- the asyncio version of sleep() correctly returns a Future instance
2.8.0
-----

View File

@@ -473,7 +473,7 @@ class _AsyncioApi(object):
:param delay: Time to sleep in seconds.
:type delay: float
"""
return asyncio.sleep(delay)
return asyncio.ensure_future(asyncio.sleep(delay))
_default_api = _AsyncioApi(config)