Changeset 1486:da919ff0985c
- Timestamp:
- 08/30/10 15:50:08 (18 months ago)
- Branch:
- default
- File:
-
- 1 edited
-
sources/src/pcExecutionWorkqueue.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sources/src/pcExecutionWorkqueue.cc
r1484 r1486 113 113 dodoList<__work__ *>::iterator o, p; 114 114 115 t hreadsProtector->acquire();115 tasksProtector->acquire(); 116 116 closing = true; 117 threadsProtector->release(); 118 119 tasksProtector->acquire(); 117 120 118 o = tasks.begin(); 121 119 p = tasks.end(); … … 130 128 j = inactive.end(); 131 129 for (; i != j; ++i) { 132 /* (*i)-> stop(); */130 /* (*i)->wait(); */ 133 131 delete *i; 134 132 } … … 204 202 } 205 203 206 if (queue->closing) 204 tasksProtector->acquire(); 205 if (queue->closing) { 206 tasksProtector->release(); 207 207 208 return 0; 209 } 210 tasksProtector->release(); 208 211 209 212 unsigned long delta = queue->maxThreads - queue->minThreads; … … 223 226 if (!queue->notification->wait(timeout)) { 224 227 unsigned long queueSize = tasks.size(); 228 229 if (queue->closing) { 230 tasksProtector->release(); 231 232 return 0; 233 } 225 234 tasksProtector->release(); 226 227 if (queue->closing)228 return 0;229 235 230 236 if (queueSize == 0) {
Note: See TracChangeset
for help on using the changeset viewer.
