Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkWaitGroupUncontended (0.38 sec)

  1. src/sync/waitgroup_test.go

    }
    
    func TestWaitGroupAlign(t *testing.T) {
    	type X struct {
    		x  byte
    		wg WaitGroup
    	}
    	var x X
    	x.wg.Add(1)
    	go func(x *X) {
    		x.wg.Done()
    	}(&x)
    	x.wg.Wait()
    }
    
    func BenchmarkWaitGroupUncontended(b *testing.B) {
    	type PaddedWaitGroup struct {
    		WaitGroup
    		pad [128]uint8
    	}
    	b.RunParallel(func(pb *testing.PB) {
    		var wg PaddedWaitGroup
    		for pb.Next() {
    			wg.Add(1)
    			wg.Done()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 14 17:38:39 UTC 2021
    - 3K bytes
    - Viewed (0)
Back to top