thread::Thread
- Inherits: api::ExecutionContext
public
- thread::Thread::Attributes
- thread::Thread::Construct
Types
#
CancelState- enable
- disable
#
CancelType- deferred
- asynchronous
#
ContentionScope- system
- process
#
DetachState- joinable
- detached
#
function_ttypedef void *(* thread::Thread::function_t) (void *) )(void *)
Type: void *(*
#
IsInherit- no
- yes
#
Policyusing thread::Thread::Policy = Sched::Policy
Type: Sched::Policy
#
Scopeusing thread::Thread::Scope = ContentionScope
Type: ContentionScope
Functions
#
Thread()=defaultthread::Thread::Thread ()=default
#
Thread(const Attributes &attributes, const Construct &options)thread::Thread::Thread (const Attributes &attributes, const Construct &options)
#
Thread(const Attributes &attributes, void *argument, function_t thread_function)inline
thread::Thread::Thread (const Attributes &attributes, void *argument, function_t thread_function)
#
Thread(const Construct &options)explicit
thread::Thread::Thread (const Construct &options)
#
Thread(const Thread &thread)=deletethread::Thread::Thread (const Thread &thread)=delete
#
Thread(Thread &&a) noexceptinline
thread::Thread::Thread (Thread &&a) noexcept
#
Thread(void *argument, function_t thread_function)inline
thread::Thread::Thread (void *argument, function_t thread_function)
#
~Thread()thread::Thread::~Thread ()
#
cancel()inline
Thread & thread::Thread::cancel ()
Type: Thread &
#
cancel() constconst Thread & thread::Thread::cancel () const
Type: const Thread &
#
get_sched_policy() constSched::Policy thread::Thread::get_sched_policy () const
Type: Sched::Policy
#
get_sched_priority() constint thread::Thread::get_sched_priority () const
Type: int
#
id() constinline
pthread_t thread::Thread::id () const
Type: pthread_t
#
DetailsGets the ID of the thread.
#
is_joinable() constinline
bool thread::Thread::is_joinable () const
Type: bool
#
is_running() constbool thread::Thread::is_running () const
Type: bool
#
is_valid() constbool thread::Thread::is_valid () const
Type: bool
#
DetailsReturns true if the thread has a valid id.If create() has not been called, this will return false. If there was an error creating the thread, this will also return false;
#
join(void **value=nullptr)Thread & thread::Thread::join (void **value=nullptr)
Type: Thread &
Parameters:
void **
value
#
kill(int signal_number) constinline
const Thread & thread::Thread::kill (int signal_number) const
Type: const Thread &
Parameters:
int
signal_number
#
move()inline
Thread && thread::Thread::move ()
Type: Thread &&
#
operator=(const Thread &thread)=deleteThread & thread::Thread::operator= (const Thread &thread)=delete
Type: Thread &
Parameters:
- const Thread &
thread
#
operator=(Thread &&a) noexceptinline
Thread & thread::Thread::operator= (Thread &&a) noexcept
Type: Thread &
Parameters:
- Thread &&
a
#
set_sched_parameters(Sched::Policy policy, int priority)Thread & thread::Thread::set_sched_parameters (Sched::Policy policy, int priority)
Type: Thread &
Parameters:
- Sched::Policy
policy
int
priority
Static Functions
#
self()inline
static pthread_t thread::Thread::self ()
Type: pthread_t
#
set_cancel_state(CancelState cancel_state)static CancelState thread::Thread::set_cancel_state (CancelState cancel_state)
Type: CancelState
Parameters:
- CancelState
cancel_state
#
set_cancel_type(CancelType cancel_type)static CancelType thread::Thread::set_cancel_type (CancelType cancel_type)
Type: CancelType
Parameters:
- CancelType
cancel_type