Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkMutexSpin (0.24 sec)

  1. internal/dsync/dsync_test.go

    				}
    				// Elaborate way to say runtime.Gosched
    				// that does not put the goroutine onto global runq.
    				go func() {
    					c <- true
    				}()
    				<-c
    			}
    		}
    	})
    }
    
    func BenchmarkMutexSpin(b *testing.B) {
    	b.ResetTimer()
    	b.ReportAllocs()
    
    	// This benchmark models a situation where spinning in the mutex should be
    	// profitable. To achieve this we create a goroutine per-proc.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 19 14:35:19 UTC 2024
    - 11.1K bytes
    - Viewed (0)
Back to top