
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Goroll, Torsten Sent: Monday, November 06, 2006 11:46 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Threads] Problem with starting a sub
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@keywallet.com] Gesendet: Dienstag, 7. November 2006 00:29 An: boost-users@lists.boost.org 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@solidworks.com] Sent: Monday, November 06, 2006 5:57 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Threads] Problem with starting a sub thread 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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users