Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for waitOnCond (0.2 sec)

  1. src/context/example_test.go

    	// found value: Go
    	// key not found: color
    }
    
    // This example uses AfterFunc to define a function which waits on a sync.Cond,
    // stopping the wait when a context is canceled.
    func ExampleAfterFunc_cond() {
    	waitOnCond := func(ctx context.Context, cond *sync.Cond, conditionMet func() bool) error {
    		stopf := context.AfterFunc(ctx, func() {
    			// We need to acquire cond.L here to be sure that the Broadcast
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 20:24:28 UTC 2023
    - 6.7K bytes
    - Viewed (0)
Back to top