QuantumLibrary
|
Long running or blocking task running in the IO thread pool. More...
#include <quantum_io_task.h>
Public Types | |
using | Ptr = std::shared_ptr< IoTask > |
using | WeakPtr = std::weak_ptr< IoTask > |
![]() | |
enum | Type : int { Type::Standalone, Type::First, Type::Continuation, Type::ErrorHandler, Type::Final, Type::Termination, Type::IO } |
enum | RetCode : int { RetCode::Success = 0, RetCode::Running = std::numeric_limits<int>::max(), RetCode::Exception = (int)Running-1, RetCode::NotCallable = (int)Running-2 } |
using | Ptr = std::shared_ptr< ITask > |
using | WeakPtr = std::weak_ptr< ITask > |
Public Member Functions | |
template<class RET , class FUNC , class ... ARGS> | |
IoTask (std::shared_ptr< Promise< RET >> promise, FUNC &&func, ARGS &&... args) | |
template<class RET , class FUNC , class ... ARGS> | |
IoTask (std::shared_ptr< Promise< RET >> promise, int queueId, bool isHighPriority, FUNC &&func, ARGS &&... args) | |
IoTask (const IoTask &task)=delete | |
IoTask (IoTask &&task)=default | |
IoTask & | operator= (const IoTask &task)=delete |
IoTask & | operator= (IoTask &&task)=default |
~IoTask () | |
void | terminate () final |
Terminates the object. More... | |
int | run () final |
void | setQueueId (int queueId) final |
int | getQueueId () final |
Type | getType () const final |
bool | isBlocked () const final |
bool | isSleeping (bool updateTimer=false) final |
bool | isHighPriority () const final |
![]() | |
~ITask ()=default | |
![]() | |
virtual | ~ITerminate ()=default |
Virtual destructor. This function is explicitly left empty. More... | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
static void | operator delete (void *p) |
static void | deleter (IoTask *p) |
Long running or blocking task running in the IO thread pool.
using Bloomberg::quantum::IoTask::Ptr = std::shared_ptr<IoTask> |
using Bloomberg::quantum::IoTask::WeakPtr = std::weak_ptr<IoTask> |
Bloomberg::quantum::IoTask::IoTask | ( | std::shared_ptr< Promise< RET >> | promise, |
FUNC && | func, | ||
ARGS &&... | args | ||
) |
Bloomberg::quantum::IoTask::IoTask | ( | std::shared_ptr< Promise< RET >> | promise, |
int | queueId, | ||
bool | isHighPriority, | ||
FUNC && | func, | ||
ARGS &&... | args | ||
) |
|
delete |
|
default |
|
inline |
|
inlinestatic |
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITask.
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITask.
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITask.
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITask.
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITask.
|
inlinestatic |
|
inlinestatic |
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITask.
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITask.
|
inlinefinalvirtual |
Terminates the object.
Implements Bloomberg::quantum::ITerminate.