You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that async function cannot take longer than a certain amount of time (e.g. 200ms).
For example, the following code calls a function named test_async which display a message to the output area, sleep for 1 second, then display the same message again:
It should print "hello world!", sleep for 1 second and print again. However, we can only see it printed once.
If we now change the sleep time from 1 to 0.1, it works as expected. After experimenting with different values, I found the breaking point is around 0.2 (200ms).
@oeway Thanks for filing the issue. Since this issue was filed a while ago, there have been a number of upgrades to our ecosystem including an upgrade to ipython==7.34 and Python 3.9.
Although YMMV, the asyncio machinery appears to be working (and with various values passed to asyncio.sleep()) when utilizing asyncio.get_running_loop():
If you are still experiencing the issue, please re-open and provide a minimal reproducible notebook.
It appears that async function cannot take longer than a certain amount of time (e.g. 200ms).
For example, the following code calls a function named
test_async
which display a message to the output area, sleep for 1 second, then display the same message again:It should print "hello world!", sleep for 1 second and print again. However, we can only see it printed once.
If we now change the sleep time from 1 to 0.1, it works as expected. After experimenting with different values, I found the breaking point is around 0.2 (200ms).
Could you please look into this issue? @blois
The text was updated successfully, but these errors were encountered: