Alex Grönholm added the comment:
+1. It was specifically SQLAlchemy (but not limited to it -- there are many
other blocking APIs) that made me look for a way to easily use threads with
native coroutines.
The best workaround I've come up with:
from asyncio import wrap_future
async def foo():
await wrap_future(executor.submit(...))
But as I mentioned before, wrap_future() is nowhere to be found in the asyncio
docs.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24383>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com