Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveValueRef ¶
type ActiveValueRef struct {
// contains filtered or unexported fields
}
func (ActiveValueRef) C ¶
func (me ActiveValueRef) C() chan struct{}
Returns the limiting channel. Send to it to obtain a slot, and receive to release the slot.
func (ActiveValueRef) Drop ¶
func (me ActiveValueRef) Drop()
Drop the reference to a key, this allows keys to be reclaimed when they're no longer in use.
type Instance ¶
type Instance struct { SlotsPerKey int // contains filtered or unexported fields }
Manages resources with a limited number of concurrent slots for use for each key.
func (*Instance) GetRef ¶
func (i *Instance) GetRef(key Key) ActiveValueRef
Get a reference to the values for a key. You should make sure to call Drop exactly once on the returned value when done.
Click to show internal directories.
Click to hide internal directories.