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

NetworkInterface::startCommand should be able to reject requests due to shutdown

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • 3.3.5
    • None
    • Networking
    • None
    • Fully Compatible
    • Platforms 12 (04/01/16)
    • 0

    Description

      In order to allow the ThreadPoolTaskExecutor to issue NetworkInterface::startCommand outside the executor's mutex, it is necessary that startCommand return some indication as to whether or not the network interface takes ownership of the operation.

      Proposed behavior:

      NetworkInterface::startCommand returns false if NetworkInterface::shutdown has already started, and true otherwise. If it returns true, then the onFinish argument will be executed by NetworkInterface eventually; otherwise, it will not. setAlarm should behave similarly

      NetworkInterface::shutdown blocks until callbacks assocated with all accepted commands and alarms have executed. It is OK (preferred?) for shutdown() to cause some or all pending callbacks to execute with a "CallbackCanceled" status in order to expedite shutdown.

      Attachments

        Activity

          People

            waley.chen Waley Chen
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: