From: Glen Knowles (gknowles_at_[hidden])
Date: 2004-09-02 12:30:43
> From: David Abrahams
> "Peter Dimov" <pdimov_at_[hidden]> writes:
> > John Maddock wrote:
> >>> ** checking pthread_yield... no
> >>> This is correct, but I do have a pthread_yield_np()
> function, maybe
> >>> we should look for it, too.
> >> It's up to the thread lib guys to use it (or not), maybe you could
> >> hassle the authors of the thread lib you are using to provide a
> >> standard function signature?
> > There is no pthread_yield in POSIX. Yields are evil anyway. ;-)
> Why evil?
There's a lot of backing for this, and the best single comment is probably:
....Similarly, sched_yield() can be used to resolve some problems
on a uniprocessor, though such problems can usually be solved more
cleanly in other ways. Using sched_yield() will never solve a problem
(unless the problem statement is "the performance is too good") on a
multiprocessor, and you should never use it there.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk