Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My understanding is that this is basically how discrete-event simulations work under the hood. You have a frontier of future events in an appropriate data structure (say, a heap) and then alternate between adding future events into the heap and pulling the next event off the heap.

So, modulo several layers of abstraction and a bunch of implementation details I'm glossing over, using a scheduler like this to sort values is just a heapsort :)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: