Re: How to wait for multiple threads simultaneously?
- From: Dildo Bogumil di Boscopelo <psycho_78@xxxxxxxxx>
- Date: Tue, 12 Feb 2008 11:55:11 +0100
chjfth@xxxxxxxxx wrote:
Hello,
I'd like to ask whether Linux 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.
you should give a look to pthread_cond_create and similar POSIX functions.
--
SF
Facciamo quello per cui siamo stati addestrati, per cui siamo stati cresciuti, per cui siamo nati. Niente prigionieri, nessuna pietà. Inizio memorabile.
.
- References:
- How to wait for multiple threads simultaneously?
- From: chjfth
- How to wait for multiple threads simultaneously?
- Prev by Date: Re: How to wait for multiple threads simultaneously?
- Next by Date: Re: How to wait for multiple threads simultaneously?
- Previous by thread: Re: How to wait for multiple threads simultaneously?
- Next by thread: Re: How to wait for multiple threads simultaneously?
- Index(es):
Relevant Pages
|