Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for BenchmarkMutexSpin (0.23 sec)

  1. src/sync/mutex_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) {
    	// This benchmark models a situation where spinning in the mutex should be
    	// profitable. To achieve this we create a goroutine per-proc.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 16 21:25:35 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  2. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 11K bytes
    - Viewed (0)
Back to top