Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestCondSignalStealing (0.23 sec)

  1. src/sync/cond_test.go

    			}
    			if x == 3 {
    				break
    			}
    			c.L.Unlock()
    			runtime.Gosched()
    			c.L.Lock()
    		}
    		c.L.Unlock()
    		done <- true
    	}()
    	<-done
    	<-done
    	<-done
    }
    
    func TestCondSignalStealing(t *testing.T) {
    	for iters := 0; iters < 1000; iters++ {
    		var m Mutex
    		cond := NewCond(&m)
    
    		// Start a waiter.
    		ch := make(chan struct{})
    		go func() {
    			m.Lock()
    			ch <- struct{}{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 22 18:52:42 UTC 2023
    - 5K bytes
    - Viewed (0)
Back to top