| 23 | {} |
| 24 | |
| 25 | virtual void Do() |
| 26 | { |
| 27 | while (!IsCancelled()) |
| 28 | { |
| 29 | IRoutine * task = m_popFn(); |
| 30 | if (task == NULL) |
| 31 | { |
| 32 | Cancel(); |
| 33 | continue; |
| 34 | } |
| 35 | |
| 36 | if (!task->IsCancelled()) |
| 37 | task->Do(); |
| 38 | m_finishFn(task); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | private: |
| 43 | TPopRoutineFn m_popFn; |
no test coverage detected