Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/WireGuard/wireguard-go
/ Get
Method
Get
device/pools.go:26–36 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
24
}
25
26
func
(p *WaitPool) Get() any {
27
if
p.max != 0 {
28
p.lock.Lock()
29
for
p.count >= p.max {
30
p.cond.Wait()
31
}
32
p.count++
33
p.lock.Unlock()
34
}
35
return
p.pool.Get()
36
}
37
38
func
(p *WaitPool) Put(x any) {
39
p.pool.Put(x)
Callers
13
TestWaitPool
Function · 0.95
BenchmarkWaitPool
Function · 0.95
BenchmarkWaitPoolEmpty
Function · 0.95
getMessages
Method · 0.80
Send
Method · 0.80
main
Function · 0.80
IpcGetOperation
Method · 0.80
GetInboundElementsContainer
Method · 0.80
GetOutboundElementsContainer
Method · 0.80
GetMessageBuffer
Method · 0.80
GetInboundElement
Method · 0.80
GetOutboundElement
Method · 0.80
Calls
1
Wait
Method · 0.80
Tested by
4
TestWaitPool
Function · 0.76
BenchmarkWaitPool
Function · 0.76
BenchmarkWaitPoolEmpty
Function · 0.76
BenchmarkSyncPool
Function · 0.64