9 Feb
2021
9 Feb
'21
7:52 p.m.
On Tue, Feb 9, 2021 at 7:20 AM Dominique Devienne
...
At the end of the day, backpressure means that you limit the rate at which you launch the dependee tasks (the A and B tasks). You can do this two ways. Have the dependent task responsible for launching its dependencies every time it completes, and some condition is met (for example, that there are less than N dependent tasks active). Or, the dependee task blocks until some condition is met (again, when there are less than N dependent tasks active). There is no need to resort to exotic libraries or operating system facilities, this is a straightforward problem which can be solved entirely using the C++11 standard library. Thanks