Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for _MakeExclusive (0.25 sec)

  1. test/typeparam/chans.go

    // at a time. This is implemented using channels rather than a mutex.
    type _Exclusive[Val any] struct {
    	c chan Val
    }
    
    // _MakeExclusive makes an initialized exclusive value.
    func _MakeExclusive[Val any](initial Val) *_Exclusive[Val] {
    	r := &_Exclusive[Val]{
    		c: make(chan Val, 1),
    	}
    	r.c <- initial
    	return r
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 8.4K bytes
    - Viewed (0)
Back to top