This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
How to wait for multiple threads simultaneously?
- From: "Chen (é) Jun (å)" <chjfth at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 31 Jan 2008 14:07:40 +0800
- Subject: How to wait for multiple threads simultaneously?
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.