Improved performance in applications with lots of threads by temporarily switching to a high priority when waiting and signalling, then using Sleep(0) to more or less yield to the thread that calls SetEvent()
Restricted the Sleep(0) yield to cases where there is a real wait going on (timeout > 0)