MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / thread_callback

Method thread_callback

drivers/apple/thread_apple.cpp:54–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54void *Thread::thread_callback(void *p_data) {
55 ThreadData *thread_data = static_cast<ThreadData *>(p_data);
56
57 // Set the caller ID for this thread
58 caller_id = thread_data->caller_id;
59
60 ScriptServer::thread_enter(); // Scripts may need to attach a stack.
61
62 // Call the actual callback
63 thread_data->callback(thread_data->userdata);
64
65 ScriptServer::thread_exit();
66
67 // Clean up
68 memdelete(thread_data);
69
70 return nullptr;
71}
72
73Error Thread::set_name(const String &p_name) {
74 int err = pthread_setname_np(p_name.utf8().get_data());

Callers

nothing calls this directly

Calls 2

memdeleteFunction · 0.85
callbackMethod · 0.45

Tested by

no test coverage detected