24#ifndef LIBTHREADAR_THREAD_HPP
25#define LIBTHREADAR_THREAD_HPP
223 mutable mutex field_control;
227 mutable bool do_cancel;
232 static void *run_obj(
void *obj);
Wrapper around the Posix pthread_mutex_t C objects.
exception used to trigger thread cancellation
Class thread is a pure virtual class, that implements thread creation and operations.
bool is_running() const
checks whether a separated thread is running the inherited_run() method of this object
void cancellation_checkpoint() const
available withing the inherited_run() method to eventually trigger thread cancellation
void run()
launch the current object routing in a separated thread
virtual void inherited_cancel()
void set_signal_mask(const sigset_t &mask)
set signal mask for this object's when the thread will be run
void cancel()
the caller send a cancellation request to this object's running thread if any
virtual void inherited_run()=0
action to be performed in the separated thread
bool is_running(pthread_t &id) const
checks whether the object is running in a separated thread
thread(const thread &ref)=delete
copy constructor and assignment operator are disabled
virtual ~thread()
destructor
void join() const
the caller will be suspended until the current object's thread ends
defines the mutex C++ class
This is the only namespace used in libthreadar and all symbols provided by libthreadar are member of ...