trantor
Non-blocking I/O cross-platform TCP network library, using C++14
Loading...
Searching...
No Matches
trantor::TaskQueue Class Referenceabstract

This class is a pure virtual class that can be implemented as a SerialTaskQueue or a ConcurrentTaskQueue. More...

#include <trantor/utils/TaskQueue.h>

Inheritance diagram for trantor::TaskQueue:
Collaboration diagram for trantor::TaskQueue:

Public Member Functions

virtual void runTaskInQueue (const std::function< void()> &task)=0
virtual void runTaskInQueue (std::function< void()> &&task)=0
virtual std::string getName () const
void syncTaskInQueue (const std::function< void()> &task)
 Run a task in the queue synchronously. This means that the task is executed before the method returns.

Additional Inherited Members

Protected Member Functions inherited from trantor::NonCopyable
 NonCopyable (const NonCopyable &)=delete
NonCopyable & operator= (const NonCopyable &)=delete
 NonCopyable (NonCopyable &&) noexcept(true)=default
NonCopyable & operator= (NonCopyable &&) noexcept(true)=default

Detailed Description

This class is a pure virtual class that can be implemented as a SerialTaskQueue or a ConcurrentTaskQueue.

Member Function Documentation

◆ getName()

virtual std::string trantor::TaskQueue::getName ( ) const
inlinevirtual

◆ runTaskInQueue()

virtual void trantor::TaskQueue::runTaskInQueue ( const std::function< void()> & task)
pure virtual

◆ syncTaskInQueue()

void trantor::TaskQueue::syncTaskInQueue ( const std::function< void()> & task)
inline

Run a task in the queue synchronously. This means that the task is executed before the method returns.

Parameters
task

The documentation for this class was generated from the following file: