Message252272
I thought you might be interested to know what the name suggests to a relative newcomer to asyncio.
When I saw this issue opened, I though "oh, good, an easy way to submit a coroutine from a thread in my test code, now I don't have to write 'loop.call_soon_threadsafe(loop.create_task, my_coroutine(loop=loop))". Which I suspect you are going to tell me is stupid code, but the point is that that's what the name 'call_coroutine_threadsafe' made me think it was going to do. After reading the linked issue I was very confused about what it was actually going to do, as I've never gotten around to looking up what ensure_future does.
If I'm understanding correctly now, I think my assumption was pretty much correct, and the only difference is that I get back something I can actually manipulate if I need to, making it even better, and which the documentation should make clear when I get to read it :) |
|
Date |
User |
Action |
Args |
2015-10-04 16:19:18 | r.david.murray | set | recipients:
+ r.david.murray, gvanrossum, vstinner, python-dev, yselivanov, vxgmichel |
2015-10-04 16:19:18 | r.david.murray | set | messageid: <1443975558.35.0.181726493569.issue25304@psf.upfronthosting.co.za> |
2015-10-04 16:19:18 | r.david.murray | link | issue25304 messages |
2015-10-04 16:19:18 | r.david.murray | create | |
|