|
std::size_t | id () const noexcept override |
| The task's id.
|
|
const transwarp::option_str & | name () const noexcept override |
| The optional task name.
|
|
std::int64_t | priority () const noexcept override |
| The task priority (defaults to 0)
|
|
const transwarp::any_data & | custom_data () const noexcept override |
| The custom task data (may not hold a value)
|
|
void | set_priority (std::int64_t priority) override |
| Sets a task priority (defaults to 0). transwarp will not directly use this. This is only useful if something else is using the priority (e.g. a custom executor)
|
|
void | reset_priority () override |
| Resets the task priority to 0.
|
|
void | set_custom_data (transwarp::any_data custom_data) override |
| Assigns custom data to this task. transwarp will not directly use this. This is only useful if something else is using this custom data (e.g. a custom executor)
|
|
void | remove_custom_data () override |
| Removes custom data from this task.
|
|
std::shared_future< result_type > | future () const noexcept override |
| Returns the future associated to the underlying execution.
|
|
void | add_listener (std::shared_ptr< transwarp::listener > listener) override |
| Adds a new listener for all event types.
|
|
void | add_listener (transwarp::event_type event, std::shared_ptr< transwarp::listener > listener) override |
| Adds a new listener for the given event type only.
|
|
void | remove_listener (const std::shared_ptr< transwarp::listener > &listener) override |
| Removes the listener for all event types.
|
|
void | remove_listener (transwarp::event_type event, const std::shared_ptr< transwarp::listener > &listener) override |
| Removes the listener for the given event type only.
|
|
void | remove_listeners () override |
| Removes all listeners.
|
|
void | remove_listeners (transwarp::event_type event) override |
| Removes all listeners for the given event type.
|
|
std::shared_ptr< task > | clone () const |
|
virtual void | set_value (const typename transwarp::decay< result_type >::type &value)=0 |
|
virtual void | set_value (typename transwarp::decay< result_type >::type &&value)=0 |
|
virtual transwarp::result< result_type >::type | get () const =0 |
|
virtual void | finalize ()=0 |
|
virtual std::size_t | level () const noexcept=0 |
|
virtual transwarp::task_type | type () const noexcept=0 |
|
virtual std::shared_ptr< transwarp::executor > | executor () 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_all (std::int64_t priority)=0 |
|
virtual void | reset_priority_all ()=0 |
|
virtual void | set_custom_data_all (transwarp::any_data custom_data)=0 |
|
virtual void | remove_custom_data_all ()=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_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_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 |
|
template<typename ResultType>
class transwarp::detail::task_common< ResultType >
Common task functionality shared across task_impl
and value_task