55 LEAVE_STATUS_INITIALIZATION_FAILED,
56 LEAVE_STATUS_THREAD_FAILED,
57 LEAVE_STATUS_INSTRUMENTATION,
70 runner(std::string
const & name);
76 std::string
const &
get_name()
const;
80 virtual void run() = 0;
99 std::string
const f_name = std::string();
A mutex object to ensures atomicity.
The runner is the class that wraps the actual system thread.
std::shared_ptr< runner > pointer_t
The shared pointer of a thread runner.
std::vector< pointer_t > vector_t
A vector of threads.
virtual bool continue_running() const
Whether the thread should continue running.
virtual ~runner()
The destructor checks that the thread was stopped.
mutex f_mutex
The mutex of this thread.
runner(runner const &rhs)=delete
The copy operator is deleted.
std::string const f_name
The name of this thread.
virtual void enter()
Signal that the run() function is about to be entered.
virtual void run()=0
This virtual function represents the code run by the thread.
thread * get_thread() const
Retrieve the thread controller linked to this runner.
std::string const & get_name() const
Retrieve the name of the runner.
virtual void leave(leave_status_t status)
Signal that the run() function has returned.
thread * f_thread
A pointer back to the owner ("parent") of this runner.
virtual bool is_ready() const
Check whether this thread runner is ready.
pid_t gettid() const
Get this runner thread identifier.
runner & operator=(runner const &rhs)=delete
This assignment operator is deleted.
A thread object that ensures proper usage of system threads.
Thread Runner and Managers.
leave_status_t
The exit status.