Boost threads running serially, not in parallel?

If that's your real code then you have a problem for(i = 0; I Push_back(Individuo(true)); // add new entry to list _individuos.back().Start(); // start a thread for that entry }.

If that's your real code then you have a problem. For(i = 0; I It then copies that object into the list, and promptly destroys the stack object, leaving a dangling pointer in the new thread. This gives you undefined behaviour.

Since list never moves an object in memory once it has been inserted, you could start the thread after inserting into the list: for(i = 0; I Push_back(Individuo(true)); // add new entry to list _individuos.back().Start(); // start a thread for that entry }.

Yes! That was exactly the problem. I was sure it had something to do with list.

Push_back() copying the object (since I had to overload the copy ctor but couldn't really seize the issue - I tried using a pointer-to-thread instead of thread but it only arose some strange reference count errors). But I digress... Thank you very much! – ahpoblete Mar 3 at 19:26.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions