|
|
@ -47,14 +47,16 @@ TR_eventDispatcherStart(TR_EventDispatcher this) |
|
|
(TR_EventSubject)this, |
|
|
(TR_EventSubject)this, |
|
|
TR_DISPATCHER_EVENT_HEARTBEAT, |
|
|
TR_DISPATCHER_EVENT_HEARTBEAT, |
|
|
NULL); |
|
|
NULL); |
|
|
} else if (TR_queueEmpty(this->events)) { |
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
event = TR_queueGet(this->events); |
|
|
|
|
|
|
|
|
|
|
|
if (! event) { |
|
|
int evtid = TR_EVD_CLIENT == this->mode |
|
|
int evtid = TR_EVD_CLIENT == this->mode |
|
|
? TR_DISPATCHER_EVENT_USER_WAIT |
|
|
? TR_DISPATCHER_EVENT_USER_WAIT |
|
|
: TR_DISPATCHER_EVENT_DATA_WAIT; |
|
|
: TR_DISPATCHER_EVENT_DATA_WAIT; |
|
|
|
|
|
|
|
|
event = TR_eventSubjectEmit((TR_EventSubject)this, evtid, NULL); |
|
|
event = TR_eventSubjectEmit((TR_EventSubject)this, evtid, NULL); |
|
|
} else { |
|
|
|
|
|
event = TR_queueGet(this->events); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
handler_queue_hv = TR_hashGetByVal( |
|
|
handler_queue_hv = TR_hashGetByVal( |
|
|
|