- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkOnceFunc (0.19 sec)
-
src/sync/oncefunc_test.go
func runtime_blockUntilEmptyFinalizerQueue(int64) bool var ( onceFunc = sync.OnceFunc(func() {}) onceFuncOnce sync.Once ) func doOnceFunc() { onceFuncOnce.Do(func() {}) } func BenchmarkOnceFunc(b *testing.B) { b.Run("v=Once", func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { // The baseline is direct use of sync.Once. doOnceFunc() } })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 17:31:33 UTC 2023 - 6.9K bytes - Viewed (0)