I have to handle the following scenerio: I've 5 tasks("A","B","C","D","E"), I'd like to parallelize them but in respect to their dependiences. They have to be executed in such an order:
A --> B --\
C ----------> E
D --------/
So "E" is executed when all the previous ones are finished and "B" has to be executed after A. And here is my question. Are there any ready to go solutions (STL, Boost)? Or I will have to implement it basing on std::thread?
check out TBB's Flow Graph or the PPL.
The example in the TBB link shows approximately what you have sketched. You already formulated your problem abstracted as tasks. No need to get down to the thread level at first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With