Register a function to be called when the event loop is idle, and would otherwise sleep.
See Implementation
Register a function to be called when the event loop is idle, and would otherwise sleep.