-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
Discussion in the PR for SERVER-72605 uncovered some ambiguities with respect to the thread-safeness of ASIOSession. While the synchronous API is guaranteed to be called from only one thread, the asynchronous API can be called from multiple threads. It appears that there is thread-unsafe behavior in the asynchronous API, specifically with respect to calling thread-unsafe methods on the `_socket` and `_sslSocket` members, whether directly or via the `getSocket` method.
Examine all uses of the asynchronous API (particular methods of interest listed below), determine whether they might be called from multiple threads and whether they are already self-synchronizing, and resolve any thread-unsafe behavior (or file tickets requesting such changes).
- `asyncSourceMessage`
- `asyncSinkMessage`
- `cancelAsyncOperations`
- `isConnected`
- is related to
-
SERVER-72605 Ensure and document thread-safety semantics for `Session::end()`
- Closed