Hmm. My own test program has a clear demonstration that this
isn't quite right; a 'sleep2 -1 10we' shows that having an
event trigger a wait gets the waiting thread some priority back.
This suggests that adding
if (ret == WAIT_TIMEOUT)
prior to the NtYieldExecution() gives the best results.
Jer