19#include <trantor/exports.h>
31class TRANTOR_EXPORT SerialTaskQueue :
public TaskQueue
58 SerialTaskQueue() =
delete;
67 virtual ~SerialTaskQueue();
77 [[deprecated(
"Use isRunningTask instead")]]
92 return loopThread_.getLoop()
93 ? loopThread_.getLoop()->isCallingFunctions()
111 std::string queueName_;
This class represents an event loop thread.
Definition EventLoopThread.h:33
void waitAllTasksFinished()
Wait until all tasks in the queue are finished.
SerialTaskQueue(const std::string &name)
Construct a new serial task queue instance.
virtual std::string getName() const
Get the name of the queue.
Definition SerialTaskQueue.h:47
bool isRuningTask()
Check whether a task is running in the queue.
Definition SerialTaskQueue.h:78
void stop()
Stop the queue.
bool isRunningTask()
Check whether a task is running in the queue.
Definition SerialTaskQueue.h:90
virtual void runTaskInQueue(const std::function< void()> &task)
Run a task in the queue.
size_t getTaskCount()
Get the number of tasks in the queue.
This class is a pure virtual class that can be implemented as a SerialTaskQueue or a ConcurrentTaskQu...
Definition TaskQueue.h:29
Definition EventLoop.h:34