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

Method Push

event/ev_queue.go:30–40  ·  view source on GitHub ↗
(event EventMsg)

Source from the content-addressed store, hash-verified

28}
29
30func (this *EventQueue) Push(event EventMsg) {
31 this.ev_queue.Push(event)
32 atomic.AddInt32(&this.q, 1)
33
34 if this.notify_one() == true {
35 select {
36 case this.ev_cond <- true:
37 default:
38 }
39 }
40}
41
42func (this *EventQueue) Get(event_list []interface{}, count uint32) uint32 {
43 if atomic.LoadInt32(&this.q) < 0 {

Callers

nothing calls this directly

Calls 1

notify_oneMethod · 0.95

Tested by

no test coverage detected