From 2cb1e5cb3a29b287c2732d68525872a3ab400f82 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 30 Jan 2025 18:27:37 -0500 Subject: [PATCH] Clarify temporal semantics for RunShutdownable.Shutdown --- actor.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/actor.go b/actor.go index 7782d08..43563e8 100644 --- a/actor.go +++ b/actor.go @@ -99,9 +99,8 @@ type RunShutdownable interface { // non-nil error explaining why. Shutdown does not need to be called in // the latter case. Run() error - // Shutdown shuts down the actor. It must be called while Run is - // running, and it must unblock Run even if it fails, the context - // expires, it returns an error, etc. Shutdown must return when or + // Shutdown shuts down the actor. It must unblock Run in all cases even + // on failure, context expiration, etc. Shutdown must return when or // before the context expires, and must return ctx.Err if there is no // other error to be returned. If Shutdown returns any error, the object // must be treated as invalid and any other process which depends on it