Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestRaceMapBigKeyAccess1 (0.32 sec)

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

    }
    
    // BigKey and BigVal must be larger than 256 bytes,
    // so that compiler sets KindGCProg for them.
    type BigKey [1000]*int
    
    type BigVal struct {
    	x int
    	y [1000]*int
    }
    
    func TestRaceMapBigKeyAccess1(t *testing.T) {
    	m := make(map[BigKey]int)
    	var k BigKey
    	ch := make(chan bool, 1)
    	go func() {
    		_ = m[k]
    		ch <- true
    	}()
    	k[30] = new(int)
    	<-ch
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 03 22:09:38 UTC 2017
    - 5.1K bytes
    - Viewed (0)
Back to top