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

Avoid copy in Future::tapAll

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability

      The implementation for Future::tapAll currently constructs a StatusWith<T> using T's copy constructor, which it then passes to the provided callback. This is potentially wasteful, as tapAll callbacks often do not require ownership of the result. Furthermore, this prevents one from registering a tapAll callback on a Future whose result type is non-copyable.

      If possible, we should relax this constraint on Future::tapAll.

            Assignee:
            Unassigned Unassigned
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: