MCPcopy Create free account
hub / github.com/cloudwego/netpoll / lock

Method lock

connection_lock.go:77–79  ·  view source on GitHub ↗
(k key)

Source from the content-addressed store, hash-verified

75}
76
77func (l *locker) lock(k key) (success bool) {
78 return atomic.CompareAndSwapInt32(&l.keychain[k], 0, 1)
79}
80
81func (l *locker) unlock(k key) {
82 atomic.StoreInt32(&l.keychain[k], 0)

Callers 6

onConnectMethod · 0.45
onDisconnectMethod · 0.45
onProcessMethod · 0.45
closeCallbackMethod · 0.45
FlushMethod · 0.45
WriteMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected