-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
Fully Compatible
SERVER-92570 and SERVER-92820 asks to futurize NetworkInterfaceTL's setAlarm and command scheduling methods. Because these will now return SemiFuture, ThreadPoolTaskExecutor will need to chain their continuations onto an executor, preferably itself via .thenRunOn(shared_from_this). We can't do this safely currently because ThreadPoolTaskExecutor, and more generally TaskExecutor, instances are sometimes created/owned by unique_ptr, which means that shared_from_this could fail.
These tickets can be resolved in the meantime with unsafeToInline and then having the continuations schedule the actual work on the ThreadPoolTaskExecutor but this is awkward because there are two schedules that occur for each operation and undesirable since it steals some, albeit not an excessive amount, of execution resources from the NetworkInterfaceTL.
We should change all the current unique_ptr references to TaskExecutor to shared_ptr ones so that we can safely use shared_from_this in TaskExecutor.
- is related to
-
SERVER-93649 enable_shared_from_this objects are sometimes created and owned via unique_ptr
- Closed
- related to
-
SERVER-95017 Complete TODO listed in SERVER-93651
- Closed
-
SERVER-95193 Complete TODO listed in SERVER-93651
- Closed