diff --git a/internal/fmsg/defer.go b/internal/fmsg/defer.go index cee3c73..deef58f 100644 --- a/internal/fmsg/defer.go +++ b/internal/fmsg/defer.go @@ -37,12 +37,14 @@ func Exit(code int) { } func Withhold() { + dequeueOnce.Do(dequeue) if wstate.CompareAndSwap(false, true) { withhold <- struct{}{} } } func Resume() { + dequeueOnce.Do(dequeue) if wstate.CompareAndSwap(true, false) { withhold <- struct{}{} }