This should take care of most compile issues as well as busy loops caused by unhandled recv() calls returning 0 and general cleanups.
This will probably be used by default on UNIX platforms at some point. The timeout handling accomplishes O(1) inserts, removes and reschedules but the accuracy is limited to whole seconds.