Showing the changes to assignment-client/src/AssignmentClient.cpp (1 of 4 files). Show all
Unified · Split
| @@ -148,6 +148,9 @@ void AssignmentClient::readPendingDatagrams() { · 147 unmodified lines | ||
| 148 | 148 | |
| 149 | 149 | _currentAssignment->moveToThread(workerThread); |
| 150 | 150 | |
| 151 | + // move the NodeList to the thread used for the _current assignment | |
| 152 | + nodeList->moveToThread(workerThread); | |
| 153 | + | |
| 151 | 154 | // Starts an event loop, and emits workerThread->started() |
| 152 | 155 | workerThread->start(); |
| 153 | 156 | } else { |
| @@ -172,6 +175,9 @@ void AssignmentClient::assignmentCompleted() { · 18 unmodified lines | ||
| 172 | 175 | |
| 173 | 176 | NodeList* nodeList = NodeList::getInstance(); |
| 174 | 177 | |
| 178 | + // move the NodeList back to our thread | |
| 179 | + nodeList->moveToThread(thread()); | |
| 180 | + | |
| 175 | 181 | // reset our NodeList by switching back to unassigned and clearing the list |
| 176 | 182 | nodeList->setOwnerType(NODE_TYPE_UNASSIGNED); |
| 177 | 183 | nodeList->reset(); |