state(EXECUTOR_CREATING), taskStart(0),
currentTask(NULL), curTaskType(NO_TASK_TYPE),
tasklog(TASK_LOG_SIZE), slowjobs(TASK_LOG_SIZE) {
- gettimeofday(&now, NULL);
- set_max_tv(waketime);
++ now = gethrtime();
+ waketime = hrtime_t(-1);
}
~ExecutorThread() {
const task_type_t getQueueType() const { return queueType; }
+ size_t getReadyQueueSize();
+
+ size_t getFutureQueueSize();
+
+ size_t getPendingQueueSize();
+
private:
void _schedule(ExTask &task);
- struct timeval _reschedule(ExTask &task, task_type_t &curTaskType);
+ hrtime_t _reschedule(ExTask &task, task_type_t &curTaskType);
void _checkPendingQueue(void);
bool _fetchNextTask(ExecutorThread &thread, bool toSleep);
void _wake(ExTask &task);