-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Sleeping for 0 ms results in a sleep of 1 ms #6390
Comments
I haven't looked in depth; however, @baoyachi could you do some historical searching through github for sleep(0) issues and report back? |
Version
List the versions of all
tokio
crates you are using. The easiest way to getthis information is using
cargo tree
subcommand:tokio v1.36.0
Platform
Darwin MacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64
Description
I set the code for Duration:: from secs (0) and expect the delay of the tokio sleep to be 0, as if the sleep executed for 1ms. At present, the code that sleep (0) does not sleep does not take effect
the output:
The text was updated successfully, but these errors were encountered: