Lines Matching refs:WorkItem
45 struct WorkItem { struct
46 WorkItem() = delete;
47 WorkItem(const WorkItem& other) = delete;
48 WorkItem& operator=(const WorkItem& other) = delete; argument
49 WorkItem(WorkItem&& other) = default;
50 WorkItem& operator=(WorkItem&& other) = default; argument
52 WorkItem(nsecs_t runAt, std::function<void()>&& work) in WorkItem() function
65 std::vector<WorkItem> toProcess; in process() argument
71 [&now](WorkItem& item) { return item.runAt > now; }); in process()
85 enqueue(WorkItem{time, std::function<void()>(std::forward<F>(func))}); in postAt()
90 enqueue(WorkItem{clock::now() + delay, std::function<void()>(std::forward<F>(func))}); in postDelayed()
122 void enqueue(WorkItem&& item) { in enqueue()
128 [time = item.runAt](WorkItem & item) { return item.runAt > time; }); in enqueue()
140 std::vector<WorkItem> mWorkQueue;