MCPcopy Create free account
hub / github.com/encodeous/nylon / Put

Method Put

polyamide/device/pools.go:38–47  ·  view source on GitHub ↗
(x any)

Source from the content-addressed store, hash-verified

36}
37
38func (p *WaitPool) Put(x any) {
39 p.pool.Put(x)
40 if p.max == 0 {
41 return
42 }
43 p.lock.Lock()
44 defer p.lock.Unlock()
45 p.count--
46 p.cond.Signal()
47}
48
49func (device *Device) PopulatePools() {
50 device.pool.inboundElementsContainer = NewWaitPool(PreallocatedBuffersPerPool, func() any {

Callers 13

TestWaitPoolFunction · 0.95
BenchmarkWaitPoolFunction · 0.95
BenchmarkWaitPoolEmptyFunction · 0.95
putMessagesMethod · 0.80
SendMethod · 0.80
IpcGetOperationMethod · 0.80
PutMessageBufferMethod · 0.80
PutTCElementMethod · 0.80
PutInboundElementMethod · 0.80
PutOutboundElementMethod · 0.80

Calls

no outgoing calls

Tested by 4

TestWaitPoolFunction · 0.76
BenchmarkWaitPoolFunction · 0.76
BenchmarkWaitPoolEmptyFunction · 0.76
BenchmarkSyncPoolFunction · 0.64