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

General Interruption Facility

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.4
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • Platforms 2018-07-16, Platforms 2018-07-30, Platforms 2018-08-13, Platforms 2018-09-24
    • 27

      Add support for a generalized interruptibility facility in the server.

      This offers a generalized interruptibility facility, trialed inFuture<T> and ProducerConsumerQueue<T>.

      It offers 3 major concepts:

      Notifyable: A type which can notified off-thread, causing a wake up from some kind of blocking wait

      Waitable: A type which is Notifyable, and also can perform work while in a ready-to-receive notification state. static methods offer support for running underneath condition_variable::wait's. The chief implementer is the transport layer baton type

      Interruptible: A type which can wait on condition variables, and offers:

      • deadlines. This means the type integrates some sort of clock source
      • interruptibility. This means the type offers a way of noticing that it should no longer run via status or exception

      Additionally, Interruptible's offer special scoped guards which offer

      • Exemption from interruption in a region defined by the lifetime of a guard object
      • Subsidiary deadlines which can trigger recursively, offering specialized timeout and status return support.

      The series of virtual types allows us to slice the interface between opCtx and future such that opctx can use future and future can use opctx. Additionally, cutting out more functionality allows us to flow a noop interruptibility type which unifies our waiting behind a common api.

            Assignee:
            mira.carey@mongodb.com Mira Carey
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: