On Fri 04 Oct, Terry wrote: > i tried a few pthreaded programs and they all have problems with pth.
Since pth is a cooperative system and not preemptive, should you not be calling the poll routine at carefully chosen points in the program? It could be that you're expecting control to be yielded by pth automatically, but in fact have to call pth_yield() in various wait loops directly. The man page doesn't seem to be entirely clear. Under pth_yield, it says "...execution is implicitly transferred back to the scheduler when a thread waits for an event. But when a thread has to do larger CPU bursts, it can be reasonable to interrupt it explicitly...". What it does not say [1] is what exactly it means by "event" and what actions/calls would lead to an event being waited upon (this may be "well known" for experienced Unix programmers; however, I'm a beginner at present). [1] (in that particular part of the manual, anyway). -- TTFN, Andrew (on behalf of myself, not my employer). "Hold tight, lad, and think of Lancashire Hotpot!" - A Grand Day Out ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ User Support Mailing List [EMAIL PROTECTED] Automated List Manager (Majordomo) [EMAIL PROTECTED]