Search Options

Results per page
Sort
Preferred Languages
Advance

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

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

    	c1 := make(chan bool)
    	go func() {
    		select {
    		case <-c:
    		case <-c1:
    		}
    		x = 1
    		compl <- true
    	}()
    	x = 2
    	close(c)
    	runtime.Gosched()
    	<-compl
    }
    
    func TestNoRaceSelect3(t *testing.T) {
    	var x int
    	_ = x
    	compl := make(chan bool)
    	c := make(chan bool, 10)
    	c1 := make(chan bool)
    	go func() {
    		x = 1
    		select {
    		case c <- true:
    		case <-c1:
    		}
    		compl <- true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 05:25:54 UTC 2020
    - 4.1K bytes
    - Viewed (0)
Back to top