How to wait for multiple threads simultaneously?

"Chen (陈) Jun (军)" chjfth@gmail.com
Thu Jan 31 06:08:00 GMT 2008


Hello,

I'd like to ask whether glibc provides an effective way to wait for 
multiple thread's end. Using pthread_join, I can only wait for one 
thread at a time. Microsoft provides WaitForMultipleObject for doing 
this , how about glibc or POSIX?

An even harder question, how can I wait for one thread's end and one 
file descriptor(e.g STDIN_FILENO) to be readable simultaneously? -- If 
either one of the two conditions becomes fulfilled, the other one must 
quit its waiting status immediately as if no wait operation was carried out.

Thank you.



More information about the Libc-alpha mailing list