18#include "pw_function/function.h"
19#include "pw_thread/id.h"
20#include "pw_thread/thread_core.h"
24#include "pw_thread_backend/thread_native.h"
151 using ThreadRoutine = void (*)(
void* arg);
191#if PW_THREAD_JOINING_ENABLED
207 template <
typename kUnusedType =
void>
209 static_assert(kJoiningEnabled<kUnusedType>,
210 "The selected pw_thread_THREAD backend does not have join() "
211 "enabled (AKA PW_THREAD_JOINING_ENABLED = 1)");
232 template <
typename...>
233 static constexpr std::bool_constant<PW_THREAD_JOINING_ENABLED>
234 kJoiningEnabled = {};
244 backend::NativeThread native_type_;
249#include "pw_thread_backend/thread_inline.h"
Thread(const Options &options, ThreadRoutine entry, void *arg=nullptr)
native_handle_type native_handle()
Thread(const Options &options, ThreadCore &thread_core)
backend::NativeThreadHandle native_handle_type
Definition: thread.h:79
Thread & operator=(Thread &&other)
~Thread()
Precondition: The thread must have been EITHER detached or joined.
bool joinable() const
Definition: thread.h:189
void swap(Thread &other)
Exchanges the underlying handles of two thread objects.
Thread(const Options &options, Function< void()> &&entry)
fit::function_impl< inline_target_size, !function_internal::config::kEnableDynamicAllocation, FunctionType, Allocator > Function
Definition: function.h:63