Details
-
New Feature
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
Service Arch
Description
SERVER-40722 introduced a wrapper for task executors to ensure all outstanding callbacks are executed before the wrapper is destroyed (defined here). This wrapper simplifies draining all tasks scheduled by a subsystem (e.g., PrimaryOnlyService) before a particular execution point (e.g., the destructor of the subsystem).
This ticket should provide a similar wrapper for instances of out-of-line executor (e.g., ThreadPool). We can also deprecate waitForIdle in favor of using scoped executors.