> I was playing around with pth trying to find out how to use it with a
> server using disk I/O. The program below is based on the example found
> in the manual page. If I comment out the call to pth_yield in the
> handler, the program will serialize all requests. What is the "right"
> way to make pth schedule other threads, like the main thread accepting
> new connections?
Really, the only answer to your question is that Pth provides cooperative
multi-tasking. It's up to you to decide when you want your threads to yield
the CPU to other threads that might be able to run. One way to do this is to
put 'pth_yield' calls in strategic places. If you really need I/O
concurrency, you really shouldn't use Pth and on FreeBSD 4, you should use
the LinuxThreads port.
DS
______________________________________________________________________
GNU Portable Threads (Pth) http://www.gnu.org/software/pth/
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager (Majordomo) [EMAIL PROTECTED]