Message247923
| Author | alex.gronholm |
|---|---|
| Recipients | Yury.Selivanov, alex.gronholm, gvanrossum, scoder, vstinner, yselivanov |
| Date | 2015-08-03.11:36:01 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1438601762.18.0.625688689972.issue24383@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
+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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015-08-03 11:36:02 | alex.gronholm | set | recipients: + alex.gronholm, gvanrossum, scoder, vstinner, Yury.Selivanov, yselivanov |
| 2015-08-03 11:36:02 | alex.gronholm | set | messageid: <1438601762.18.0.625688689972.issue24383@psf.upfronthosting.co.za> |
| 2015-08-03 11:36:02 | alex.gronholm | link | issue24383 messages |
| 2015-08-03 11:36:01 | alex.gronholm | create | |