Boost logo

Boost :

From: Scott McCaskill (scott_at_[hidden])
Date: 2001-08-02 16:54:32


> --- In boost_at_y..., "Scott McCaskill" <scott_at_m...> wrote:
> > I'd like to read the documentation/proposal for Boost.Threads (or
> source, or
> > any description)--where can I find it? The archives indicate that
> at one
> > time there was a file in the threads directory on yahoo called
> threads2.zip,
> > but it is gone, and there doesn't seem to be anything in CVS either.
>
> It does exist in CVS, but on a branch instead of part of the main
> distribution. Check out the branch threads-initial. Note, however,
> that the code and documentation are both currently under frequent and
> extensive modifications in preperation of formal submission.
>
> Bill Kempf
>

Thanks, got it. I've been perusing the source quite intently and so far I
really like what I see. I also have a question. I have an application that
creates several threads and I want the main thread to be able to find out if
any of the created threads have died. It appears that I could do this using
boost::thread::try_join() on each of the created threads, but is there (or
will there be) a better way? Currently, the app is using
WaitForMultipleObjects() to do this.

I realize that this is probably just an optimization, but it feels strange
to have to poll to find out if a thread has ended.

Thanks,
scott

P.S.-- I also spotted an apparent infinite loop in the code:

bool thread::operator!=(const thread& other) const
{
    return operator!=(other);
}

That should be !operator==(other), no?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk