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