MCPcopy Create free account
hub / github.com/Cyinx/einx / notify_one

Method notify_one

event/ev_queue.go:51–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51func (this *EventQueue) notify_one() bool {
52 for {
53 n := atomic.LoadUint32(&this.n)
54 if atomic.LoadUint32(&this.w) == n {
55 return false
56 }
57 if atomic.CompareAndSwapUint32(&this.n, n, n+1) {
58 return true
59 }
60 }
61}
62
63func (this *EventQueue) WaitNotify() bool {
64 atomic.AddUint32(&this.w, 1)

Callers 3

PushMethod · 0.95
WaitNotifyMethod · 0.95
WaiterWakeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected