-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
-
v4.0, v3.6
-
Platforms 2018-05-21, Platforms 2018-06-04
Provide a type which offers concurrent keyed and queued execution of tasks.
Something that looks like:
KeyedExecutor<std::string> ke(someExecutorMaybeThreadPool); auto doThingFuture = ke.execute("foo", []{ return doThing(); }); auto doOtherThingFuture = ke.execute("foo", []{ return doOtherthing(); }); auto waitForCurrentFooState = ke.waitForAll("foo");
Where:
- Jobs under the same key provide mutual exclusion
- Tasks are executed via the passed executor
- running jobs returns futures
- waiting for a queue to clear up to a point is based on the back of the queue at the time of the call's future.