- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkMakeChan (0.13 sec)
-
src/runtime/chan_test.go
time.Sleep(10 * time.Millisecond) // Force concurrent GC to shrink the stacks. runtime.GC() // Wake selects. close(d) <-ready1 <-ready2 } type struct0 struct{} func BenchmarkMakeChan(b *testing.B) { b.Run("Byte", func(b *testing.B) { var x chan byte for i := 0; i < b.N; i++ { x = make(chan byte, 8) } close(x) }) b.Run("Int", func(b *testing.B) { var x chan int
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 20:47:35 UTC 2023 - 23.4K bytes - Viewed (0)