-
-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trio.sleep(float('nan')) is valid and sleeps forever #2493
Comments
I think |
|
But somewhat surprisingly |
AFAIK there is nothing to require that the values returned by |
trio.sleep(float('nan'))
currently sleeps forever. Fixing it is pretty trivial by reordering the if statements but there's maybe other stuff that would break with NaN, and it might not be worth fixing a theoretical issue that idk if it might ever happen in reality - though I could imagine it biting somebody somewhere.for reference:
time.sleep()
gives a ValueError,asyncio.sleep()
sleeps for 0The text was updated successfully, but these errors were encountered: