API Documentation
|
A class that allows user to use a function inline to execute something. More...
#include <BasicThread.h>
Public Member Functions | |
BasicThread (const String &name, const bool &is_loop, const std::function< void()> &callback) | |
void | run () override |
Public Member Functions inherited from Thread | |
void | detach () |
void | forceStop () |
bool | isPrimaryThread () const |
bool | isRunning () const |
void | join () |
virtual void | requestStopThread () |
void | setIsPrimaryThread (bool is_primary_thread) |
void | setThreadName (const String &name) |
virtual bool | shouldExitThread () const |
void | start () |
virtual void | stopThread () |
Thread () | |
Thread (const String &name) | |
Thread (const Thread &name)=delete | |
const String & | threadName () const |
virtual | ~Thread () |
Static Public Member Functions | |
static void | splitThread (const std::function< void()> &callback_a, const std::function< void()> &callback_b) |
static void | splitThread (const String &split_name, const std::function< void()> &callback_a, const std::function< void()> &callback_b) |
template<uint04 t_max_number_of_threads> | |
static std::enable_if< t_max_number_of_threads<=32, void >::type | ThreadLoop (uint04 number_of_loops, const std::function< void(uint04 index)> &callback) |
template<uint04 t_max_number_of_threads> | |
static void | ThreadLoop (uint04 number_of_loops, volatile uint04 &loops_performed, const std::function< void(uint04 index)> &callback) |
Static Public Member Functions inherited from Thread | |
static Thread & | CurrentThread () |
static String | CurrentThreadName () |
static void | ServiceVirtualThreads () |
static void | SetCurrentThreadName (const String &name) |
static void | StopAllThreads () |
Protected Attributes | |
std::function< void()> | m_function |
Protected Attributes inherited from Thread | |
volatile bool | m_is_running = false |
volatile bool | m_is_single_run = true |
Additional Inherited Members | |
Protected Member Functions inherited from Thread | |
const std::thread & | self () |
|
explicit |
|
inlineoverridevirtual |
Reimplemented from Thread.
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
protected |