summaryrefslogtreecommitdiff
path: root/core/os/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/thread.cpp')
-rw-r--r--core/os/thread.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/os/thread.cpp b/core/os/thread.cpp
index 7fb1e969d4..f5d984876d 100644
--- a/core/os/thread.cpp
+++ b/core/os/thread.cpp
@@ -32,6 +32,7 @@
Thread* (*Thread::create_func)(ThreadCreateCallback,void *,const Settings&)=NULL;
Thread::ID (*Thread::get_thread_ID_func)()=NULL;
void (*Thread::wait_to_finish_func)(Thread*)=NULL;
+Error (*Thread::set_name_func)(const String&)=NULL;
Thread::ID Thread::_main_thread_id=0;
@@ -60,6 +61,9 @@ void Thread::wait_to_finish(Thread *p_thread) {
Error Thread::set_name(const String &p_name) {
+ if (set_name_func)
+ return set_name_func(p_name);
+
return ERR_UNAVAILABLE;
};