- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for popTail (0.09 sec)
-
src/sync/pool.go
New func() any } // Local per-P Pool appendix. type poolLocalInternal struct { private any // Can be used only by the respective P. shared poolChain // Local P can pushHead/popHead; any P can popTail. } type poolLocal struct { poolLocalInternal // Prevents false sharing on widespread platforms with // 128 mod (cache line size) = 0 . pad [128 - unsafe.Sizeof(poolLocalInternal{})%128]byte }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 9.4K bytes - Viewed (0) -
src/sync/pool_test.go
atomic.StoreInt32(&stop, 1) } } // Start P-1 consumers. for i := 1; i < P; i++ { wg.Add(1) go func() { fail := 0 for atomic.LoadInt32(&stop) == 0 { val, ok := d.PopTail() if ok { fail = 0 record(val.(int)) } else { // Speed up the test by // allowing the pusher to run. if fail++; fail%100 == 0 { runtime.Gosched() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8K bytes - Viewed (0)