40 typedef void (*ThreadCreateCallback)(
void *p_userdata);
55 Settings() { priority=PRIORITY_NORMAL; }
63 static Thread* (*create_func)(ThreadCreateCallback p_callback,
void *,
const Settings&);
64 static ID (*get_thread_ID_func)();
65 static void (*wait_to_finish_func)(
Thread*);
66 static Error (*set_name_func)(
const String&);
70 static ID _main_thread_id;
77 virtual ID get_ID()
const=0;
79 static Error set_name(
const String &p_name);
80 _FORCE_INLINE_
static ID
get_main_ID() {
return _main_thread_id; }
static ID get_caller_ID()
get the ID of the caller function ID
Definition: thread.cpp:39
static _FORCE_INLINE_ ID get_main_ID()
get the ID of the main thread
Definition: thread.h:80
static Thread * create(ThreadCreateCallback p_callback, void *p_user, const Settings &p_settings=Settings())
Static function to create a thread, will call p_callback.
Definition: thread.cpp:46
static void wait_to_finish(Thread *p_thread)
waits until thread is finished, and deallocates it.
Definition: thread.cpp:55