Search Options

Results per page
Sort
Preferred Languages
Advance

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

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

    		Empty
    	}
    	type Y struct {
    		x X
    		y int64
    	}
    	c := make(chan X)
    	var y Y
    	go func() {
    		x := y.x
    		c <- x
    	}()
    	y.y = 42
    	<-c
    }
    
    func TestRaceNestedStruct(t *testing.T) {
    	type X struct {
    		x, y int
    	}
    	type Y struct {
    		x X
    	}
    	c := make(chan Y)
    	var y Y
    	go func() {
    		c <- y
    	}()
    	y.x.y = 42
    	<-c
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 23 16:46:25 UTC 2023
    - 28.9K bytes
    - Viewed (0)
Back to top