Message317221
Sorry, no.
The feature was requested many times but was constantly rejected.
By this, you are adding a BLOCKING call to your async function.
At least it leads to log warning about too long callback execution.
Moreover, I suspect that `run_until_complete` reentrancy requirement breaks the existing third-party loop implementations, not all loops can be fixed easily.
The last: calling blocking code from async code is the anti-pattern, asyncio explicitly discourages it.
You should convert all your stack to async functions and add sync stubs
when needed like
def sync_call(arg):
asyncio.get_event_loop().run_until_complete(async_call(arg))
Yuri, do you agree with me? |
|
Date |
User |
Action |
Args |
2018-05-21 08:55:44 | asvetlov | set | recipients:
+ asvetlov, lukasz.langa, yselivanov, fried |
2018-05-21 08:55:44 | asvetlov | set | messageid: <1526892944.18.0.682650639539.issue33523@psf.upfronthosting.co.za> |
2018-05-21 08:55:44 | asvetlov | link | issue33523 messages |
2018-05-21 08:55:44 | asvetlov | create | |
|