Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35027

Add makePromiseFuturePair() helper to util/future.h

      It would be helpful to have a utility which produced promises and futures in one atomic operation, because actually extracting a future from a promise is a racy operation (for multiple threads extracting the future, and for extracting the future and fulfilling the promise).

      It should probably look something like:

      auto [promise, future] = makePromiseFuturePair<T>();
      

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: