Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cloudwego/netpoll
/ lock
Function
lock
fd_operator_cache.go:91–95 ·
view source on GitHub ↗
(locked *int32)
Source
from the content-addressed store, hash-verified
89
}
90
91
func
lock(locked *int32) {
92
for
!atomic.CompareAndSwapInt32(locked, 0, 1) {
93
runtime.Gosched()
94
}
95
}
96
97
func
unlock(locked *int32) {
98
atomic.StoreInt32(locked, 0)
Callers
3
alloc
Method · 0.85
freeable
Method · 0.85
free
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…