Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2006-11-06 18:29:07


An additional approach could be a thread group, which can create a bunch of
threads. Than you can call join on entire group, where the caller thread
blocks until all threads are finished.

-----Original Message-----
From: Nat Goodspeed [mailto:ngoodspeed_at_[hidden]]
Sent: Monday, November 06, 2006 5:57 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [Threads] Problem with starting a sub thread

> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Goroll, Torsten
> Sent: Monday, November 06, 2006 11:46 AM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [Threads] Problem with starting a sub
thread
>
> I understood and experienced that the main thread blocks. But how can
it
> join
> other threads, if it is blocked? That doesn't seem consistent to me.

[Nat] Usually one wouldn't create a thread and then immediately join() it.
The net effect of that would seem to be an expensive function call.

Usually if you want a new thread to run in parallel with the thread that
created it, you let both threads run for a while before one thread attempts
to join() the other.
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net