- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TestExclusive (0.16 sec)
-
test/typeparam/chansimp.dir/main.go
defer after.Stop() send := func(v int) { select { case c <- v: case <-after.C: panic("timed out sending to Sink") } } send(1) send(2) send(3) close(c) } func TestExclusive() { val := 0 ex := a.MakeExclusive(&val) var wg sync.WaitGroup f := func() { defer wg.Done() for i := 0; i < 10; i++ { p := ex.Acquire() (*p)++ ex.Release(p) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 3.1K bytes - Viewed (0) -
test/typeparam/chans.go
send := func(v int) { select { case c <- v: case <-after.C: panic("timed out sending to _Sink") } } send(1) send(2) send(3) close(c) } func TestExclusive() { val := 0 ex := _MakeExclusive(&val) var wg sync.WaitGroup f := func() { defer wg.Done() for i := 0; i < 10; i++ { p := ex.Acquire() (*p)++ ex.Release(p) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 8.4K bytes - Viewed (0)