c++ - How to make boost::thread_group execute a fixed number of parallel threads -
This is the code to create a thread_group and execute all the threads in parallel:
boost :: thread group group; For (Int i = 0; I
This code will execute all the threads at once. What I want to do, is to execute them all, but in parallel maximum 4 When it ends, no one else is executed unless it is done otherwise to execute it.
Once the more efficient solution is finished, the primary thread will have to callback each thread, and the primary thread The handler can launch new thread every time. This stops repeating calls from time to time, because the primary thread will not do anything until the callback triggers.
Comments
Post a Comment