Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tailscale/tailscale
/ Drain
Method
Drain
wgengine/netstack/link_endpoint.go:78–85 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
76
}
77
78
func
(q *queue) Drain() int {
79
c := 0
80
for
pkt :=
range
q.c {
81
pkt.DecRef()
82
c++
83
}
84
return
c
85
}
86
87
func
(q *queue) Num() int {
88
return
len(q.c)
Callers
1
Drain
Method · 0.45
Calls
1
DecRef
Method · 0.80
Tested by
no test coverage detected