Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestNoRaceRpcChan (0.26 sec)

  1. src/runtime/race/testdata/regression_test.go

    //go:noinline
    func makeChan() *RpcChan {
    	makeChanCalls++
    	c := &RpcChan{make(chan bool, 1)}
    	c.c <- true
    	return c
    }
    
    func call() bool {
    	x := <-makeChan().c
    	return x
    }
    
    func TestNoRaceRpcChan(t *testing.T) {
    	makeChanCalls = 0
    	_ = call()
    	if makeChanCalls != 1 {
    		t.Fatalf("makeChanCalls %d, expected 1\n", makeChanCalls)
    	}
    }
    
    func divInSlice() {
    	v := make([]int64, 10)
    	i := 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 03 02:01:34 UTC 2015
    - 2.7K bytes
    - Viewed (0)
Back to top