News for hackers. Stuff that matters.
Re:How much memory do you need in 2024 to run 1M concurrent ... by claytonwramsey on Thursday November 28, 2024 @11:29PM (#42270807)
The implementation of `sleep` [1] decides the wake up time by when `sleep` is called, rather than when its future is polled. So the first task waits one second, then the remaining tasks see that they have already passed the wake-up time and so return instantly.

[1]: https://docs.rs/tokio/latest/tokio/time/fn.sleep.html

Re:How much memory do you need in 2024 to run 1M concurrent ... by davidatbu on Thursday November 28, 2024 @11:41PM (#42270863)
This makes total sense!