Boost logo

Boost Users :

From: Goroll, Torsten (Torsten.Goroll_at_[hidden])
Date: 2006-11-07 03:20:58


Hi,

thank you all for your help. It was a basically missunderstanding of join() on my side. The message of Nat Goodspeed helped me to discover that.

So, lets close this thread.

Torsten

-----Ursprüngliche Nachricht-----
Von: Ovanes Markarian [mailto:om_boost_at_[hidden]]
Gesendet: Dienstag, 7. November 2006 00:29
An: boost-users_at_[hidden]
Betreff: Re: [Boost-users] [Threads] Problem with starting a sub thread

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