-
-
Save pitrou/296447d747f043cc62fd91a6c114983e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
async def coro(n=50): | |
if n > 1: | |
await coro(n - 1) | |
else: | |
return 42 | |
loop = asyncio.new_event_loop() | |
loop.set_debug(True) | |
def func(): | |
loop.run_until_complete(coro()) | |
if __name__ == "__main__": | |
for i in range(1000): | |
func() | |
loop.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment