QuantumLibrary
|
Runnable object representing a coroutine. More...
#include <quantum_task.h>
Public Types | |
using | Ptr = std::shared_ptr< Task > |
using | WeakPtr = std::weak_ptr< Task > |
![]() | |
using | Ptr = std::shared_ptr< ITaskContinuation > |
using | WeakPtr = std::weak_ptr< ITaskContinuation > |
![]() | |
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> | |
Task (std::shared_ptr< Context< RET >> ctx, ITask::Type type, FUNC &&func, ARGS &&... args) | |
template<class RET , class FUNC , class ... ARGS> | |
Task (std::shared_ptr< Context< RET >> ctx, int queueId, bool isHighPriority, ITask::Type type, FUNC &&func, ARGS &&... args) | |
Task (const Task &task)=delete | |
Task (Task &&task)=default | |
Task & | operator= (const Task &task)=delete |
Task & | operator= (Task &&task)=default |
~Task () | |
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 |
ITaskContinuation::Ptr | getNextTask () final |
void | setNextTask (ITaskContinuation::Ptr nextTask) final |
ITaskContinuation::Ptr | getPrevTask () final |
void | setPrevTask (ITaskContinuation::Ptr prevTask) final |
ITaskContinuation::Ptr | getFirstTask () final |
ITaskContinuation::Ptr | getErrorHandlerOrFinalTask () final |
![]() | |
virtual void | setNextTask (Ptr nextTask)=0 |
virtual void | setPrevTask (Ptr nextTask)=0 |
![]() | |
~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 (Task *p) |
Runnable object representing a coroutine.
using Bloomberg::quantum::Task::Ptr = std::shared_ptr<Task> |
using Bloomberg::quantum::Task::WeakPtr = std::weak_ptr<Task> |
Bloomberg::quantum::Task::Task | ( | std::shared_ptr< Context< RET >> | ctx, |
ITask::Type | type, | ||
FUNC && | func, | ||
ARGS &&... | args | ||
) |
Bloomberg::quantum::Task::Task | ( | std::shared_ptr< Context< RET >> | ctx, |
int | queueId, | ||
bool | isHighPriority, | ||
ITask::Type | type, | ||
FUNC && | func, | ||
ARGS &&... | args | ||
) |
|
delete |
|
default |
Bloomberg::quantum::Task::~Task | ( | ) |
|
inlinestatic |
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITaskContinuation.
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITaskContinuation.
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITaskContinuation.
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITaskContinuation.
|
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.
|
inlinefinal |
|
inlinefinal |
|
inlinefinalvirtual |
Implements Bloomberg::quantum::ITask.
|
inlinefinalvirtual |
Terminates the object.
Implements Bloomberg::quantum::ITerminate.