Skip to content

Commit 86a6904

Browse files
author
Carlo Alberto Ferraris
authored
Remove the previous doc change as it's confusing
1 parent 6f76572 commit 86a6904

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gcnotifier.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,15 @@ func autoclose(n *gcnotifier) {
6767
}
6868
}
6969

70-
// New creates and arms a new GCNotifier. The *GCNotifier object returned by
71-
// New() must be kept alive until you need to receive the notifications.
70+
// New creates and arms a new GCNotifier.
7271
func New() *GCNotifier {
7372
n := &gcnotifier{
7473
gcCh: make(chan struct{}, 1),
7574
doneCh: make(chan struct{}, 1),
7675
}
7776
// sentinel is dead immediately after the call to SetFinalizer
7877
runtime.SetFinalizer(&sentinel{gcCh: n.gcCh, doneCh: n.doneCh}, finalizer)
79-
// n will be dead when the GCNotifier that wraps it (see the return) is dead
78+
// n will be dead when the GCNotifier that wraps it (see the return below) is dead
8079
runtime.SetFinalizer(n, autoclose)
8180
// we wrap the internal gcnotifier object in a GCNotifier so that we can
8281
// safely call autoclose when the GCNotifier becomes unreachable

0 commit comments

Comments
 (0)