File tree 1 file changed +4
-2
lines changed 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,10 @@ import (
30
30
// unreachable at the same time, their cleanups all become eligible to run
31
31
// and can run in any order. This is true even if the objects form a cycle.
32
32
//
33
- // A single goroutine runs all cleanup calls for a program, sequentially. If a
34
- // cleanup function must run for a long time, it should create a new goroutine.
33
+ // Cleanups run concurrently with any user-created goroutines.
34
+ // Cleanups may also run concurrently with one another (unlike finalizers).
35
+ // If a cleanup function must run for a long time, it should create a new goroutine
36
+ // to avoid blocking the execution of other cleanups.
35
37
//
36
38
// If ptr has both a cleanup and a finalizer, the cleanup will only run once
37
39
// it has been finalized and becomes unreachable without an associated finalizer.
You can’t perform that action at this time.
0 commit comments