| 92 | } |
| 93 | |
| 94 | void CScheduler::stop(bool drain) |
| 95 | { |
| 96 | { |
| 97 | boost::unique_lock<boost::mutex> lock(newTaskMutex); |
| 98 | if (drain) |
| 99 | stopWhenEmpty = true; |
| 100 | else |
| 101 | stopRequested = true; |
| 102 | } |
| 103 | newTaskScheduled.notify_all(); |
| 104 | } |
| 105 | |
| 106 | void CScheduler::schedule(CScheduler::Function f, boost::chrono::system_clock::time_point t) |
| 107 | { |
no outgoing calls