This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:02alex.gronholmsetrecipients: + alex.gronholm, gvanrossum, scoder, vstinner, Yury.Selivanov, yselivanov
2015-08-03 11:36:02alex.gronholmsetmessageid: <1438601762.18.0.625688689972.issue24383@psf.upfronthosting.co.za>
2015-08-03 11:36:02alex.gronholmlinkissue24383 messages
2015-08-03 11:36:01alex.gronholmcreate