Changeset 1484:751cc39c852f
- Timestamp:
- 08/29/10 12:44:24 (18 months ago)
- Branch:
- default
- File:
-
- 1 edited
-
sources/src/pcExecutionWorkqueue.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sources/src/pcExecutionWorkqueue.cc
r1482 r1484 41 41 #include <libdodo/pcSyncThread.h> 42 42 #include <libdodo/pcNotificationThread.h> 43 #include <libdodo/exceptionBasic.h> 43 44 #include <libdodo/pcSyncStack.h> 44 45 #include <libdodo/types.h> … … 77 78 minThreads(minThreads), 78 79 minIdleTime(minIdleTime), 79 tasksProtector( new pc::sync::thread),80 threadsProtector( new pc::sync::thread),81 notification( new pc::notification::thread(*tasksProtector)),80 tasksProtector(NULL), 81 threadsProtector(NULL), 82 notification(NULL), 82 83 closing(false) 83 84 { 84 if (maxThreads < minThreads) 85 maxThreads = minThreads; 86 87 thread *t; 88 for (unsigned int i=0; i<minThreads; ++i) { 89 t = new thread((routine)workqueue::worker, this, ON_DESTRUCTION_STOP); 90 inactive.push_back(t); 91 t->run(); 85 dodo_try { 86 tasksProtector = new pc::sync::thread; 87 threadsProtector = new pc::sync::thread; 88 notification = new pc::notification::thread(*tasksProtector); 89 90 if (maxThreads < minThreads) 91 maxThreads = minThreads; 92 93 thread *t; 94 for (unsigned int i=0; i<minThreads; ++i) { 95 t = new thread((routine)workqueue::worker, this, ON_DESTRUCTION_STOP); 96 inactive.push_back(t); 97 t->run(); 98 } 99 } dodo_catch (exception::basic *e UNUSED) { 100 delete notification; 101 delete tasksProtector; 102 delete threadsProtector; 103 104 dodo_rethrow; 92 105 } 93 106 }
Note: See TracChangeset
for help on using the changeset viewer.
