Esempio n. 1
0
func (eng *Engine) dispatch() {
	for ce := eng.peek(); ce != nil; ce = eng.peek() {
		for _, h := range eng.handlers {
			h.HandleEvent(makeEvent(ce, eng))
		}
		C.pn_collector_pop(eng.collector)
	}
}
Esempio n. 2
0
func (eng *Engine) process() {
	for ce := C.pn_collector_peek(eng.collector); ce != nil; ce = C.pn_collector_peek(eng.collector) {
		eng.handle(makeEvent(ce, eng))
		C.pn_collector_pop(eng.collector)
	}
}