16 ms·
Yeah, I think you're wrong. It should only take ~10s. tokio::time::sleep records the time it was called before returning the future [1]. So, all 1 million tasks
by fuzzybear3965 2y ago
Yeah, I think you're wrong. It should only take ~10s. tokio::time::sleep records the time it was called before returning the future [1]. So, all 1 million tasks should be stamped with +/- the same time (within a few milliseconds).
[1]: https://docs.rs/tokio/1.41.1/src/tokio/time/sleep.rs.html#128-131 https://docs.rs/tokio/1.41.1/src/tokio/time/sleep.rs.html#12...
- davidatbu 2y agoThis makes total sense!