How to wait for multiple threads simultaneously?



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.

Thank you.
.



Relevant Pages

  • Re: VERY basic linux system
    ... Single user because how many times have you _really_ needed to log into ... KDE multiple times on the same machine? ... under root" is silly when all you need to do is 'su' to become root, ... Including Linux. ...
    (comp.os.linux.misc)
  • Re: VERY basic linux system
    ... "> Linux, and I DO NOT want to give that impression. ... eventually end up with the same 'dependency hell' as you are describing. ... 'multi-user' (the multiple processes run with *different* UIDs) and NOT ... As to 'logging into KDE multiple times on the same machine'. ...
    (comp.os.linux.misc)
  • Re: I agree linux is not for avg. homeuser
    ... detriment to progress in the whole history of the high tech industry. ... Linux just needs to expand into the realm of the rest of the windows ... I am just waiting for the desktop developers ...
    (linux.redhat)
  • Re: Software for dual core processors?
    ... I'm getting a new computer (dual boot Linux and Windows XP) ... how about a computer that has two dual-core processors ... A Linux SMP kernel will behave as if you have four processors. ... All modern Linux distros will detect the dual-core / multiple ...
    (comp.os.linux.misc)
  • f_offset
    ... So I'm in the midst of working on other filesystem concurrency issues and that has brought me back around to f_offset again. ... Multiple readers may read the same position in the file concurrently and update the position to different offsets. ... Multiple writers may write to the same file location, although the io should be serialized by some other means. ... Posix allows for and Solaris, Linux, and historic implementations of f_offset work in the following way: ...
    (freebsd-arch)