4 ms·
Of course, then you're just relying on your scheduler, which may or may not actually do the sort correctly.
by saagarjha 8y ago
Of course, then you're just relying on your scheduler, which may or may not actually do the sort correctly.
- tinus_hn 8y agoThe scheduler doesn’t have a hard job if all but 1 thread is sleeping.
- benchaney 8y agoFiguring out which threads to wake up when is an equivalent problem to sorting. The kernel has to maintain a queue of threads sorted on their sleep times in order to implement the sleep syscall in the first place