On Thu, 11 Oct 2001 13:31:52 -0600, Armando F Ibarra wrote:
>Hi, just a question:
>Does the pth_yield funciton really work?, because the scheduler still
>attending just one thread at once, and lets another thread to work until the
>previous thread ends its work.
Your first statement, that only one thread can run at a time, is correct.
Your second statement, however, is not precisely correct. The scheduler
allows each thread to work until it calls a function that explicitly or
implicitly yields the CPU to another thread.
Examples of functions that implicitly yield include those that try to
acquire a synchronization object or perform blocking I/O. Examples of
functions that explicitly yield include those that sleep for a fixed period
of time and pth_yield.
DS
______________________________________________________________________
GNU Portable Threads (Pth) http://www.gnu.org/software/pth/
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager (Majordomo) [EMAIL PROTECTED]