AsioNetworkingBaton::detachImpl doesn't clear the _timersById map. Once a baton has detached, it shouldn't have any active timers. That is, when AsioNetworkingBaton::_cancelTimer is called after detachment, it should not see a nonempty _timersById map. Have detachImpl also clear the _timersById map. Additionally, document the fact that timers which are still active at detachment time will be cancelled at an unspecified time in the contet of detachment (i.e., those timers will no longer be available to other threads for cancellation and inline continuation execution)
Additionally, the _cancelTimer method, which is marked noexcept, calls _safeExecute which is not marked noexcept. It's likely other methods follow a similar pattern in this class. Let's take this opportunity to try to remove some of the noexcept declarations, or at least reinstrument the code so that we don't have noexcept methods calling non-noexcept methods.
- is related to
-
SERVER-96871 Add static analysis checks for throwing in noexcept boundaries
- In Progress
- related to
-
SERVER-92559 Clean up logic in AsioNetworkingBaton::detachImpl
- Backlog