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

Method stop

connection_lock.go:85–89  ·  view source on GitHub ↗
(k key)

Source from the content-addressed store, hash-verified

83}
84
85func (l *locker) stop(k key) {
86 for !atomic.CompareAndSwapInt32(&l.keychain[k], 0, 2) && atomic.LoadInt32(&l.keychain[k]) != 2 {
87 runtime.Gosched()
88 }
89}
90
91func (l *locker) isUnlock(k key) bool {
92 return atomic.LoadInt32(&l.keychain[k]) == 0

Callers 1

initFinalizerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected