XMLWordPrintable

Details

    • Fully Compatible
    • v4.0, v3.6
    • Platforms 2018-05-21, Platforms 2018-06-04

    Description

      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.

      Attachments

        Activity

          People

            jason.carey@mongodb.com Jason Carey
            jason.carey@mongodb.com Jason Carey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: