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

Consider using `boost::multimap` to maintain timers for `BatonASIO`

    • Server Programmability
    • 2

      The networking baton uses two separate data structures to maintain scheduled timers:

      // The set is used to find the next timer which will fire.  The unordered_map looks up the
      // timers so we can remove them in O(1)
      std::multimap<Date_t, Timer> _timers;
      stdx::unordered_map<size_t, decltype(_timers)::iterator> _timersById;
      

      Consider using boost::multimap to maintain the timers and reduce the complexity of keeping _timers and _timersById consistent.

            Assignee:
            Unassigned Unassigned
            Reporter:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: