171 std::unique_ptr<Impl> impl_;
Serial task dispatcher with selectable queue backend and bounded timer registry.
Definition: message_loop.h:126
Type
Internal queue implementation type.
Definition: message_loop.h:140
MessageLoop subclass that forwards every task to an internal ThreadPool.
Definition: multi_loop.h:106
MultiLoop(size_t thread_num, Type type)
Constructs a MultiLoop with a specific queue type.
bool is_in_same_thread() const override
Reports whether the calling thread belongs to this loop.
MultiLoop(size_t thread_num=4U)
Constructs a MultiLoop with the default kNormalType queue and thread_num workers.
void on_task_changed(Callback &&callback, uint32_t start_time) override
Forwards a task to the internal pool, falling back to the inline base implementation when the pool re...
void on_end() override
Hook invoked once on the dispatcher when the loop exits; shuts the worker pool down.
~MultiLoop() override
Defaulted destructor.
bool wait_for_idle(int ms=Timer::kInfinite, bool check=true) override
Waits until both the dispatcher queue and the worker pool reach idle.
void on_begin() override
Hook invoked once on the dispatcher when the loop starts; constructs the worker pool.
static constexpr int kInfinite
Sentinel loop_count value meaning fire forever.
Definition: timer.h:94
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
Single-threaded task dispatcher with three queue backends, timers and scheduling envelopes.