inline bool dequeueUntil(Sirikata::Task::AbsTime until) { return mWorkQueue->dequeueUntil(until); }
inline void enqueue(WorkItem *item) { mWorkQueue->enqueue(item); }
inline bool dequeuePoll() { return mWorkQueue->dequeuePoll(); }
/** * Adds a job to the work queue to be run. */ void queueWork(const WorkItemClass::FunctionType &work) { mWorkQueue->enqueue(new WorkItemClass(work)); }
/// destructs the work queue class, processes remaining tasks and stops it from being a singleton ~SequentialWorkQueue() { mWorkQueue->dequeueAll(); }
/** * processes a single job in the work queue if one exists * \returns true if there are any remaining jobs on the work queue */ bool processOneJob() { return mWorkQueue->dequeuePoll(); }
virtual unsigned int numSchedulableJobs() { return mWorkQueue->probablyEmpty()?0:1; }
inline bool dequeueUntil(Sirikata::Task::LocalTime until) { return mWorkQueue->dequeueUntil(until)!=0; }