Pigweed
 
Loading...
Searching...
No Matches
pw::ThreadContext< kStackSizeBytes > Class Template Reference

#include <context.h>

Public Member Functions

 ThreadContext (const ThreadContext &)=delete
 
ThreadContextoperator= (const ThreadContext &)=delete
 
constexpr thread::backend::NativeContextWithStack< kStackSizeBytes > & native ()
 

Detailed Description

template<size_t kStackSizeBytes = kExternallyAllocatedThreadStack>
class pw::ThreadContext< kStackSizeBytes >

Represents the resources required for one thread. May include OS data structures, the thread stack, or be empty, depending on the platform.

ThreadContext may be reused or deleted if the associated thread is joined.

ThreadContext takes an optional stack size template parameter. If a stack size is provided, the context allocates a stack internally, if supported by the backend. If no stack is is provided (ThreadContext<>), the ThreadContext must be paired with a pw::ThreadStack.


The documentation for this class was generated from the following file: