| 250 | } |
| 251 | |
| 252 | void Pool::init(int aThreadCount) |
| 253 | { |
| 254 | if (aThreadCount > 0) |
| 255 | { |
| 256 | mMaxTask = 0; |
| 257 | mWorkMutex = createMutex(); |
| 258 | mRunning = 1; |
| 259 | mThreadCount = aThreadCount; |
| 260 | mThread = new ThreadHandle[aThreadCount]; |
| 261 | int i; |
| 262 | for (i = 0; i < mThreadCount; i++) |
| 263 | { |
| 264 | mThread[i] = createThread(poolWorker, this); |
| 265 | } |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | void Pool::addWork(PoolTask *aTask) |
| 270 | { |
nothing calls this directly
no test coverage detected