|
|
|
@ -71,6 +71,9 @@ public:
@@ -71,6 +71,9 @@ public:
|
|
|
|
|
size_t getQueueInfo(boost::chrono::system_clock::time_point &first, |
|
|
|
|
boost::chrono::system_clock::time_point &last) const; |
|
|
|
|
|
|
|
|
|
// Returns true if there are threads actively running in serviceQueue()
|
|
|
|
|
bool AreThreadsServicingQueue() const; |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
std::multimap<boost::chrono::system_clock::time_point, Function> taskQueue; |
|
|
|
|
boost::condition_variable newTaskScheduled; |
|
|
|
@ -103,6 +106,7 @@ public:
@@ -103,6 +106,7 @@ public:
|
|
|
|
|
void AddToProcessQueue(std::function<void (void)> func); |
|
|
|
|
|
|
|
|
|
// Processes all remaining queue members on the calling thread, blocking until queue is empty
|
|
|
|
|
// Must be called after the CScheduler has no remaining processing threads!
|
|
|
|
|
void EmptyQueue(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|