pub async fn finish_task<T>(
slot: &mut TaskSlot<T>,
graceful_timeout: Duration,
abort_timeout: Duration,
) -> Option<TaskJoinOutcome<T>>Expand description
Gracefully joins one task, then aborts and joins it within a second bound.
This preserves typed task results. The handle and forced-abort state remain in slot while the
function is pending, so canceling the finish future cannot detach the task or lose its expected
cancellation provenance. A terminal join clears the slot, while a second timeout leaves the
incomplete task in place for another drain attempt.