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

Promote PromiseAndFuture to a first-class struct

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • Service Arch 2021-09-20
    • 35

      Just take this private thing defined inside a function in future.h:

              struct PromiseAndFuture {
                  Promise<T> promise = Promise(make_intrusive<SharedStateT>());
                  Future<T> future = promise.getFuture();
              };
      

      And move it basically to be in the mongo namespace.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: