mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Robustify multi-threading primitives
This commit is contained in:
@@ -121,7 +121,9 @@ Error Thread::set_name(const String &p_name) {
|
||||
Thread::~Thread() {
|
||||
if (id != _thread_id_hash(std::thread::id())) {
|
||||
#ifdef DEBUG_ENABLED
|
||||
WARN_PRINT("A Thread object has been destroyed without wait_to_finish() having been called on it. Please do so to ensure correct cleanup of the thread.");
|
||||
WARN_PRINT(
|
||||
"A Thread object is being destroyed without its completion having been realized.\n"
|
||||
"Please call wait_to_finish() on it to ensure correct cleanup.");
|
||||
#endif
|
||||
thread.detach();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user