The task class (reference result type) More...
#include <transwarp.h>
Public Types | |
using | result_type = ResultType & |
Public Member Functions | |
std::shared_ptr< task > | clone () const |
virtual void | set_value (transwarp::decay_t< result_type > &value)=0 |
virtual std::shared_future < result_type > | future () const noexcept=0 |
virtual transwarp::result_t < result_type > | get () const =0 |
![]() | |
virtual void | finalize ()=0 |
virtual std::size_t | id () const noexcept=0 |
virtual std::size_t | level () const noexcept=0 |
virtual transwarp::task_type | type () const noexcept=0 |
virtual const std::optional < std::string > & | name () const noexcept=0 |
virtual std::shared_ptr < transwarp::executor > | executor () const noexcept=0 |
virtual std::int64_t | priority () const noexcept=0 |
virtual const std::any & | custom_data () const noexcept=0 |
virtual bool | canceled () const noexcept=0 |
virtual std::int64_t | avg_idletime_us () const noexcept=0 |
virtual std::int64_t | avg_waittime_us () const noexcept=0 |
virtual std::int64_t | avg_runtime_us () const noexcept=0 |
virtual void | set_executor (std::shared_ptr< transwarp::executor > executor)=0 |
virtual void | set_executor_all (std::shared_ptr< transwarp::executor > executor)=0 |
virtual void | remove_executor ()=0 |
virtual void | remove_executor_all ()=0 |
virtual void | set_priority (std::int64_t priority)=0 |
virtual void | set_priority_all (std::int64_t priority)=0 |
virtual void | reset_priority ()=0 |
virtual void | reset_priority_all ()=0 |
virtual void | set_custom_data (std::any custom_data)=0 |
virtual void | set_custom_data_all (std::any custom_data)=0 |
virtual void | remove_custom_data ()=0 |
virtual void | remove_custom_data_all ()=0 |
virtual void | add_listener (std::shared_ptr< transwarp::listener > listener)=0 |
virtual void | add_listener (transwarp::event_type event, std::shared_ptr< transwarp::listener > listener)=0 |
virtual void | add_listener_all (std::shared_ptr< transwarp::listener > listener)=0 |
virtual void | add_listener_all (transwarp::event_type event, std::shared_ptr< transwarp::listener > listener)=0 |
virtual void | remove_listener (const std::shared_ptr< transwarp::listener > &listener)=0 |
virtual void | remove_listener (transwarp::event_type event, const std::shared_ptr< transwarp::listener > &listener)=0 |
virtual void | remove_listener_all (const std::shared_ptr< transwarp::listener > &listener)=0 |
virtual void | remove_listener_all (transwarp::event_type event, const std::shared_ptr< transwarp::listener > &listener)=0 |
virtual void | remove_listeners ()=0 |
virtual void | remove_listeners (transwarp::event_type event)=0 |
virtual void | remove_listeners_all ()=0 |
virtual void | remove_listeners_all (transwarp::event_type event)=0 |
virtual void | schedule ()=0 |
virtual void | schedule (transwarp::executor &executor)=0 |
virtual void | schedule (bool reset)=0 |
virtual void | schedule (transwarp::executor &executor, bool reset)=0 |
virtual void | schedule_all ()=0 |
virtual void | schedule_all (transwarp::executor &executor)=0 |
virtual void | schedule_all (bool reset_all)=0 |
virtual void | schedule_all (transwarp::executor &executor, bool reset_all)=0 |
virtual void | set_exception (std::exception_ptr exception)=0 |
virtual bool | was_scheduled () const noexcept=0 |
virtual void | wait () const =0 |
virtual bool | is_ready () const =0 |
virtual bool | has_result () const =0 |
virtual void | reset ()=0 |
virtual void | reset_all ()=0 |
virtual void | cancel (bool enabled) noexcept=0 |
virtual void | cancel_all (bool enabled) noexcept=0 |
virtual std::vector< itask * > | parents () const =0 |
virtual const std::vector < itask * > & | tasks ()=0 |
virtual std::vector < transwarp::edge > | edges ()=0 |
Friends | |
template<typename T > | |
std::shared_ptr< T > | transwarp::detail::clone_task (std::unordered_map< std::shared_ptr< transwarp::itask >, std::shared_ptr< transwarp::itask >> &task_cache, const std::shared_ptr< T > &t) |
Additional Inherited Members | |
![]() | |
virtual void | schedule_impl (bool reset, transwarp::executor *executor=nullptr)=0 |
The task class (reference result type)