Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMutexFairness (0.29 sec)

  1. src/sync/mutex_test.go

    		if err == nil || !strings.Contains(string(out), "unlocked") {
    			t.Errorf("%s: did not find failure with message about unlocked lock: %s\n%s\n", test.name, err, out)
    		}
    	}
    }
    
    func TestMutexFairness(t *testing.T) {
    	var mu Mutex
    	stop := make(chan bool)
    	defer close(stop)
    	go func() {
    		for {
    			mu.Lock()
    			time.Sleep(100 * time.Microsecond)
    			mu.Unlock()
    			select {
    			case <-stop:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 16 21:25:35 UTC 2022
    - 5.9K bytes
    - Viewed (0)
Back to top