|
Boost : |
From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2005-09-03 14:30:55
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk