Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Gosched (0.17 sec)

  1. internal/dsync/dsync_test.go

    				m.Lock(id, source)
    				acc0 -= 100
    				acc1 += 100
    				m.Unlock(context.Background())
    			} else {
    				for i := 0; i < len(data); i += 4 {
    					data[i]++
    				}
    				// 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()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
Back to top