I just tested something like this:
boost::thread workerThread1(boost::bind(&Class::Function, this, ...);
boost::thread workerThread2(boost::bind(&Class::Function, this, ...);
and it works fine. What i now want, is to create as many Threads as i have objects in a list. I have experimentet with boost::foreach and this works fine. But i have problems with the names of the threads.
So simplified the code looks like this:
for
{
boost:thread name(...);
}
but of course name cant be right here in the loop because it overwrites itself and isnt accessible after the loop. How do i create the threads so that i can join them all after all have been created?