aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/fmsg/defer.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fmsg/defer.go')
-rw-r--r--internal/fmsg/defer.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/fmsg/defer.go b/internal/fmsg/defer.go
index ed4a7735..0f3f5ad5 100644
--- a/internal/fmsg/defer.go
+++ b/internal/fmsg/defer.go
@@ -56,9 +56,10 @@ func Exit(code int) {
os.Exit(code)
}
-func Withhold() {
+func Suspend() {
dequeueOnce.Do(dequeue)
if wstate.CompareAndSwap(false, true) {
+ queueSync.Wait()
withhold <- struct{}{}
}
}