Commit 3f704d2ff49cd4316514a98f69ae5e6488722272

Authored by Georg Hopp
1 parent c0ce1399

Revert "It seems that I have it right now"

This reverts commit c0ce1399.
Showing 1 changed file with 1 additions and 4 deletions
@@ -102,18 +102,17 @@ TR_commManagerSelect(void * _this, TR_Event event) @@ -102,18 +102,17 @@ TR_commManagerSelect(void * _this, TR_Event event)
102 if (! this->io_triggered) { 102 if (! this->io_triggered) {
103 printf("[DEBUG] [%s] io triggerd was empty\n", buffer); 103 printf("[DEBUG] [%s] io triggerd was empty\n", buffer);
104 fflush(stdout); 104 fflush(stdout);
105 -  
106 pthread_mutex_lock(&this->io_triggered_lock); 105 pthread_mutex_lock(&this->io_triggered_lock);
107 this->io_triggered = TR_hashEach(this->write, this, commManagerIssueWriteEvents); 106 this->io_triggered = TR_hashEach(this->write, this, commManagerIssueWriteEvents);
108 this->io_triggered += TR_hashEach(this->accept, this, commManagerIssueAcceptEvents); 107 this->io_triggered += TR_hashEach(this->accept, this, commManagerIssueAcceptEvents);
109 this->io_triggered += TR_hashEach(this->read, this, commManagerIssueReadEvents); 108 this->io_triggered += TR_hashEach(this->read, this, commManagerIssueReadEvents);
  109 + pthread_mutex_unlock(&this->io_triggered_lock);
110 } 110 }
111 111
112 printf("[DEBUG] [%s] io triggerd: %lu\n", buffer, this->io_triggered); 112 printf("[DEBUG] [%s] io triggerd: %lu\n", buffer, this->io_triggered);
113 fflush(stdout); 113 fflush(stdout);
114 114
115 if (! this->io_triggered) { 115 if (! this->io_triggered) {
116 - pthread_mutex_unlock(&this->io_triggered_lock);  
117 if (NULL == timer) { 116 if (NULL == timer) {
118 timeout = TR_eventDispatcherGetDataWaitTime(dispatcher); 117 timeout = TR_eventDispatcherGetDataWaitTime(dispatcher);
119 } else { 118 } else {
@@ -124,8 +123,6 @@ TR_commManagerSelect(void * _this, TR_Event event) @@ -124,8 +123,6 @@ TR_commManagerSelect(void * _this, TR_Event event)
124 fflush(stdout); 123 fflush(stdout);
125 124
126 TR_CALL(_this, TR_CommManager, select, event, timeout); 125 TR_CALL(_this, TR_CommManager, select, event, timeout);
127 - } else {  
128 - pthread_mutex_unlock(&this->io_triggered_lock);  
129 } 126 }
130 127
131 return TR_EVENT_DONE; 128 return TR_EVENT_DONE;
Please register or login to post a comment