A good thread implementation should let the current thread continue if it can and hasn't run its full time slice. In such implementations it's probably better to not try to use a yield call together with various tricks to construct sane time slices. I think I'll try to do that on Linux and Solaris 7 and see what it gives.
/ Martin Stjernholm, Roxen IS
Previous text:
2002-09-15 12:18: Subject: Frequent context switches
Very interesting. However, I don't see what th_yield() has to do with anything. Unlocking a mutex that someone else is waiting for should automatically yield in a correct thread implementation.
/ Fredrik (Naranek) Hubinette (Real Build Master)