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_t#
typedef void *(* thread::Thread::function_t) (void *) )(void *)Type: void *(*
IsInherit#
- no
- yes
Policy#
using thread::Thread::Policy = Sched::Policy Type: Sched::Policy
Scope#
using thread::Thread::Scope = ContentionScope Type: ContentionScope
Functions
Thread()=default#
thread::Thread::Thread ()=defaultThread(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)=delete#
thread::Thread::Thread (const Thread &thread)=deleteThread(Thread &&a) noexcept#
inline
thread::Thread::Thread (Thread &&a) noexceptThread(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() const#
const Thread & thread::Thread::cancel () constType: const Thread &
get_sched_policy() const#
Sched::Policy thread::Thread::get_sched_policy () constType: Sched::Policy
get_sched_priority() const#
int thread::Thread::get_sched_priority () constType: int
id() const#
inline
pthread_t thread::Thread::id () constType: pthread_t
Details#
Gets the ID of the thread.
is_joinable() const#
inline
bool thread::Thread::is_joinable () constType: bool
is_running() const#
bool thread::Thread::is_running () constType: bool
is_valid() const#
bool thread::Thread::is_valid () constType: bool
Details#
Returns 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) const#
inline
const Thread & thread::Thread::kill (int signal_number) constType: const Thread &
Parameters:
intsignal_number
move()#
inline
Thread && thread::Thread::move ()Type: Thread &&
operator=(const Thread &thread)=delete#
Thread & thread::Thread::operator= (const Thread &thread)=deleteType: Thread &
Parameters:
- const Thread &
thread
operator=(Thread &&a) noexcept#
inline
Thread & thread::Thread::operator= (Thread &&a) noexceptType: 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 intpriority
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