From bc4f6db0ad38e19904ca54060d45b0bf0d84ba70 Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Mon, 22 May 2023 10:57:04 +0300 Subject: [PATCH] doc: explain what task_mgr gives us --- libs/utils/src/shared_retryable.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/utils/src/shared_retryable.rs b/libs/utils/src/shared_retryable.rs index d99e821b9a..1869e05918 100644 --- a/libs/utils/src/shared_retryable.rs +++ b/libs/utils/src/shared_retryable.rs @@ -20,7 +20,8 @@ use std::sync::Arc; /// ``` /// /// Implementation is cancel safe. Implementation and internal structure are hurt by the inability -/// to just spawn the task, but this is needed for pageserver usage. +/// to just spawn the task, but this is needed for `pageserver` usage. Within `pageserver`, the +/// `task_mgr` must be used to spawn the future because it will cause awaiting during shutdown. /// /// Implementation exposes a fully decomposed [`SharedRetryable::try_restart`] which requires the /// caller to do the spawning before awaiting for the result. If the caller is dropped while this