RE: [boost] Re: Porting to SCO Unix

From: David Abrahams "Peter Dimov" <pdimov@mmltd.net> 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. - Butenhof Glen
participants (1)
-
Glen Knowles