Class polled_task

Inheritance Relationships

Base Types

Class Documentation

class polled_task : public cosm::ta::executable_task, public cosm::ta::taskable

Represents a task whose execution can/should be monitored by the user to determine when it has finished.

Public Functions

polled_task(const polled_task&) = delete
inline polled_task(const std::string &name, const config::src_sigmoid_sel_config *abort, const rmath::config::ema_config *estimation, std::unique_ptr<taskable> mechanism)
~polled_task(void) override
void exec_estimate_init(const rmath::rangez &bounds, rmath::rng *rng)

Initialize the execution time estimates of the task randomly within the specified range.

inline taskable *mechanism(void) const
polled_task &operator=(const polled_task&) = delete
inline virtual void task_execute(void) final override

The method that all tasks must define that specifies how to execute the task.

inline virtual bool task_finished(void) const final override

Determine if the task has finished yet.

Returns:

TRUE if the task has finished, and FALSE otherwise.

inline virtual void task_reset(void) final override

Reset the task so that it is ready for execution again. Does nothing by default.

inline virtual bool task_running(void) const override

Determine if the task has is still running yet.

Returns:

TRUE if the task is still running, and FALSE otherwise.