This uassert can trigger when the task executor is shutting down. The exception will bubble up, through this function marked noexcept. I would suggest getting rid of the uassert and instead log a message when args.status is not OK.
It would also be good to add some documentation about the rules of callbacks and exception throwing. My guess is that callback functions passed to TaskExecutor::scheduleWork() should never throw but I don't see any warnings about it in task_executor.h.
- causes
-
SERVER-49045 Remove invariant from establishCursors cleanup code
- Closed
- related to
-
SERVER-46255 establishCursors/AsyncRequestsSender can leave dangling request if interrupted
- Closed