From 3af1f333b7957a8cf8e183f7d5235da6320fee4a Mon Sep 17 00:00:00 2001 From: Vladimir Bauer Date: Sat, 17 Aug 2024 23:49:17 +0500 Subject: [PATCH] comment for future self --- bar.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bar.go b/bar.go index 7a91814a..4d4a4da0 100644 --- a/bar.go +++ b/bar.go @@ -418,6 +418,8 @@ func (b *Bar) serve(bs *bState) { case <-b.ctx.Done(): decoratorsOnShutdown(bs.decorators[0]) decoratorsOnShutdown(bs.decorators[1]) + // bar can be aborted by canceling parent ctx + // without actually calling b.Abort bs.aborted = !bs.completed() b.bs = bs close(b.bsOk)