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

Should we make our Future<T> type awaitable, so that it supports usage with C++ coroutine keywords/primitives?

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Service Arch 2022-2-07

      • Whether or not we import an existing library for supporting types, should we make our Future<T> type awaitable, so that it supports usage with C++ coroutine keywords/primitives?
      • If so, how should users think about when to use Future<T> vs. e.g. a lazy task type or a type from another library?
      • If not, should we pre-emptively add coroutine-supporting APIs to things with Future-based APIs alongside the existing APIs? Or should we replace them? 
      • For example, TaskExecutor now has Future-based APIs as well as continuation-passing style APIs. Would we add a third to support “task” (e.g.) types?

            Assignee:
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Reporter:
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: