()
| 49 | } |
| 50 | |
| 51 | func (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 | |
| 63 | func (this *EventQueue) WaitNotify() bool { |
| 64 | atomic.AddUint32(&this.w, 1) |
no outgoing calls
no test coverage detected