Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestRaceChanItselfClose (0.28 sec)

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

    	<-compl
    }
    
    func TestRaceChanItselfNil(t *testing.T) {
    	c := make(chan int, 10)
    	go func() {
    		c <- 0
    	}()
    	time.Sleep(1e7)
    	c = nil
    	_ = c
    }
    
    func TestRaceChanItselfClose(t *testing.T) {
    	compl := make(chan bool, 1)
    	c := make(chan int)
    	go func() {
    		close(c)
    		compl <- true
    	}()
    	c = make(chan int)
    	<-compl
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 18 19:55:29 UTC 2023
    - 11K bytes
    - Viewed (0)
Back to top