Pigweed
 
Loading...
Searching...
No Matches
pw::thread::Options Class Reference

#include <options.h>

Detailed Description

The Options contains the parameters needed for a thread to start.

Options are backend specific and ergo the generic base class cannot be directly instantiated.

The attributes which can be set through the options are backend specific but may contain things like the thread name, priority, scheduling policy, core/processor affinity, and/or an optional reference to a pre-allocated Context (the collection of memory allocations needed for a thread to run).

Options shall NOT have an attribute to start threads as detached vs joinable. All pw::Thread instances must be explicitly join()'d or detach()'d through the run-time Thread API.

Note that if backends set PW_THREAD_JOINING_ENABLED to false, backends may use native OS specific APIs to create native detached threads because the join() API would be compiled out. However, users must still explicitly invoke detach().

Options must not contain any memory needed for a thread to run (TCB, stack, etc.). The Options may be deleted or re-used immediately after starting a thread.


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