
3 Sep
2005
3 Sep
'05
7:30 p.m.
Peter Dimov wrote:
Alexander Terekhov wrote:
Peter Dimov wrote:
John Maddock wrote:
I think that especially on CE, you'd really want to use a lock (on slow path) and never busy-wait... priority inversions, y'know.
Very good point, I knew I'd missed something :-)
You need Sleep(1) instead.
Won't help.
Why not?
Low priority thread preempted (inside init) by middle priority long running thread which never calls once(). Now comes the high priority thread, calls once()... and sleeps, sleeps, sleeps, ... not good. regards, alexander.