24#ifndef LIBTHREADAR_THREAD_HPP
25#define LIBTHREADAR_THREAD_HPP
163 unsigned int cancellable;
168 static void *run_obj(
void *obj);
169 static void primitive_suspend_cancellation_requests();
170 static void primitive_resume_cancellation_requests();
Wrapper around the Posix pthread_mutex_t C objects.
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 run()
launch the current object routing in a separated thread
void set_signal_mask(const sigset_t &mask)
set signal mask for this object's when the thread will be run
void kill() const
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
void suspend_cancellation_requests() const
available for inherited class to avoid thread cancellation to occur in a critical section
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
void resume_cancellation_requests() const
available for inherited class to avoid thread cancellation to occur in a critical section
defines the mutex C++ class
This is the only namespace used in libthreadar and all symbols provided by libthreadar are member of ...