| 129 | } |
| 130 | |
| 131 | size_t CScheduler::getQueueInfo(boost::chrono::system_clock::time_point &first, |
| 132 | boost::chrono::system_clock::time_point &last) const |
| 133 | { |
| 134 | boost::unique_lock<boost::mutex> lock(newTaskMutex); |
| 135 | size_t result = taskQueue.size(); |
| 136 | if (!taskQueue.empty()) { |
| 137 | first = taskQueue.begin()->first; |
| 138 | last = taskQueue.rbegin()->first; |
| 139 | } |
| 140 | return result; |
| 141 | } |
| 142 | |
| 143 | bool CScheduler::AreThreadsServicingQueue() const { |
| 144 | boost::unique_lock<boost::mutex> lock(newTaskMutex); |