[issue34701] Asyncio documentation for recursive coroutines is lacking

2018-09-15 Thread Azaria Zornberg
Azaria Zornberg added the comment: Ah, thanks for the clarification! I first encountered this when having some issues with converting large objects to json. json.dumps happens synchronously, and when executed on an object that was dozens of MB in size, it held up everything for a fair bit

[issue34701] Asyncio documentation for recursive coroutines is lacking

2018-09-15 Thread Yury Selivanov
Yury Selivanov added the comment: The issue here is not the recursion, but rather about the fact that coroutines should actually await on IO or other activity in order for the event loop to run them cooperatively. E.g. async def foo(): await foo() doesn't really do anything

[issue34701] Asyncio documentation for recursive coroutines is lacking

2018-09-15 Thread Azaria Zornberg
Change by Azaria Zornberg : -- keywords: +patch pull_requests: +8762 stage: -> patch review ___ Python tracker ___ ___

[issue34701] Asyncio documentation for recursive coroutines is lacking

2018-09-15 Thread Azaria Zornberg
New submission from Azaria Zornberg : When an asynchronous coroutine in asyncio awaits or yields from itself, any call to the function is executed somewhat synchronously. Once the recursive coroutine begins, if it never awaits any other coroutines besides itself, nothing else will be