-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service arch 2020-07-13, Service Arch 2020-07-27, Service Arch 2020-08-10
If we are on a thread pool, we want to avoid blocking threads while waiting for new data to read. This would imply that a thread somewhere is [e]polling for us, most likely an ASIOReactor. However, if we’re already on a dedicated thread, we want to block our own thread. To solve this contradiction, we want to provide a function Future<void> ServiceExecutor::waitForData(Session*) that polls and then reschedules execution for its future. We should be able to invoke asio::async_read with an asio::null_buffers, thus copying no data until we are safely on the correct thread.
- depends on
-
SERVER-49848 Add interface to check single-threaded context
- Closed
- has to be done after
-
SERVER-49105 Create fixed thread pool ServiceExecutor
- Closed