Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestRaceMutexRWMutex (0.24 sec)

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

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package race_test
    
    import (
    	"sync"
    	"testing"
    	"time"
    )
    
    func TestRaceMutexRWMutex(t *testing.T) {
    	var mu1 sync.Mutex
    	var mu2 sync.RWMutex
    	var x int16 = 0
    	_ = x
    	ch := make(chan bool, 2)
    	go func() {
    		mu1.Lock()
    		defer mu1.Unlock()
    		x = 1
    		ch <- true
    	}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 03 22:09:38 UTC 2017
    - 2.1K bytes
    - Viewed (0)
Back to top