I'm new to threadpool so I apologize if this is a silly quesiton.
I would like to specify that my shutdown policy should be "wait for completion of all active tasks and worker termination"
I'm not sure how to specify this in my code.
Currently I do:
boost::threadpool::thread_pool TP(8); // 8 threads
for(int i = 0; i < 1000; i++) TP.schedule( someFunction(), i );
This seems to "hang" for a long time at the last job.
I think I need to change my scheduling policy (correct me if I'm wrong).
Can anyone provide me an example of how you call the "wait_for_active_tasks" class?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.