Skip to content

Commit 95eecda

Browse files
committed
add
1 parent 7b31ec6 commit 95eecda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sync/onceImpl.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ type Onces struct {
1010
done int32
1111
}
1212
func (o *Onces) Do(f func()) {
13-
if atomic.LoadInt32(&o.done) == 1 {
14-
return
15-
}
13+
//if atomic.LoadInt32(&o.done) == 1 {
14+
// return
15+
//}
1616
// Slow-path.
1717
if atomic.CompareAndSwapInt32(&o.done, 0, 1) {
1818
f()

0 commit comments

Comments
 (0)