Boost logo

Boost Users :

Subject: Re: [Boost-users] thread running many times
From: Kraus Philipp (philipp.kraus_at_[hidden])
Date: 2011-09-12 06:29:48


Am 12.09.2011 um 08:14 schrieb Igor R:

>> Thanks, I understand, so my group is after join_all empty, so I change my code to:
>>
>> for(i=0; i < iteration; ++i) {
>> create thread group
>> run thread group with join_all for parallel part
>> run serial part
>> }
>>
>> so on each iteration I need to create a new thread group
>
>
> The group is not empty, it contains all those boost::thread objects
> you put there. But actual threads associated with those objects are
> already over at this point. So you have to create & launch another
> ones.

That's my question, I have create a thread groups with object and run them. I would like to run the same objects with the same parameters again, so need I (re)create the objects within the group again or can I use the group with a new join_all again (without recreating)?
I would like to use my thread objects again with the waiting option join_all.

Thanks

Phil


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