-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Internal Code
-
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.