|
|
@ -102,18 +102,17 @@ TR_commManagerSelect(void * _this, TR_Event event) |
|
|
if (! this->io_triggered) { |
|
|
if (! this->io_triggered) { |
|
|
printf("[DEBUG] [%s] io triggerd was empty\n", buffer); |
|
|
printf("[DEBUG] [%s] io triggerd was empty\n", buffer); |
|
|
fflush(stdout); |
|
|
fflush(stdout); |
|
|
|
|
|
|
|
|
pthread_mutex_lock(&this->io_triggered_lock); |
|
|
pthread_mutex_lock(&this->io_triggered_lock); |
|
|
this->io_triggered = TR_hashEach(this->write, this, commManagerIssueWriteEvents); |
|
|
this->io_triggered = TR_hashEach(this->write, this, commManagerIssueWriteEvents); |
|
|
this->io_triggered += TR_hashEach(this->accept, this, commManagerIssueAcceptEvents); |
|
|
this->io_triggered += TR_hashEach(this->accept, this, commManagerIssueAcceptEvents); |
|
|
this->io_triggered += TR_hashEach(this->read, this, commManagerIssueReadEvents); |
|
|
this->io_triggered += TR_hashEach(this->read, this, commManagerIssueReadEvents); |
|
|
|
|
|
pthread_mutex_unlock(&this->io_triggered_lock); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
printf("[DEBUG] [%s] io triggerd: %lu\n", buffer, this->io_triggered); |
|
|
printf("[DEBUG] [%s] io triggerd: %lu\n", buffer, this->io_triggered); |
|
|
fflush(stdout); |
|
|
fflush(stdout); |
|
|
|
|
|
|
|
|
if (! this->io_triggered) { |
|
|
if (! this->io_triggered) { |
|
|
pthread_mutex_unlock(&this->io_triggered_lock); |
|
|
|
|
|
if (NULL == timer) { |
|
|
if (NULL == timer) { |
|
|
timeout = TR_eventDispatcherGetDataWaitTime(dispatcher); |
|
|
timeout = TR_eventDispatcherGetDataWaitTime(dispatcher); |
|
|
} else { |
|
|
} else { |
|
|
@ -124,8 +123,6 @@ TR_commManagerSelect(void * _this, TR_Event event) |
|
|
fflush(stdout); |
|
|
fflush(stdout); |
|
|
|
|
|
|
|
|
TR_CALL(_this, TR_CommManager, select, event, timeout); |
|
|
TR_CALL(_this, TR_CommManager, select, event, timeout); |
|
|
} else { |
|
|
|
|
|
pthread_mutex_unlock(&this->io_triggered_lock); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return TR_EVENT_DONE; |
|
|
return TR_EVENT_DONE; |
|
|
|