Details
-
Improvement
-
Resolution: Unresolved
-
Minor - P4
-
None
-
None
-
Service Arch
-
2
Description
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.