Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestCustomContextAfterFuncCancel (0.17 sec)

  1. src/context/afterfunc_test.go

    	c.mu.Lock()
    	defer c.mu.Unlock()
    	if c.err != nil {
    		return
    	}
    	c.err = err
    	for _, f := range c.afterFuncs {
    		go f()
    	}
    	c.afterFuncs = nil
    }
    
    func TestCustomContextAfterFuncCancel(t *testing.T) {
    	ctx0 := &afterFuncContext{}
    	ctx1, cancel := context.WithCancel(ctx0)
    	defer cancel()
    	ctx0.cancel(context.Canceled)
    	<-ctx1.Done()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 16:58:52 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top