mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix thread IDs.
On Linux, thread IDs were not properly assigned with the current approach. The line: `std::thread new_thread(&Thread::callback, _thread_id_hash(thread.get_id()), p_settings, p_callback, p_user);` does not work because the thread ID is not assigned until the thread starts. This PR changes the behavior to use manually generated thread IDs. Additionally, if a thread is (or may have been created) outside Godot, the method `Thread::attach_external_thread` was added.
This commit is contained in:
parent
24cb43a874
commit
a37c30dfc9
7 changed files with 47 additions and 42 deletions
|
@ -3306,6 +3306,8 @@ EditorExportPlatformAndroid::EditorExportPlatformAndroid() {
|
|||
EditorExportPlatformAndroid::~EditorExportPlatformAndroid() {
|
||||
#ifndef ANDROID_ENABLED
|
||||
quit_request.set();
|
||||
check_for_changes_thread.wait_to_finish();
|
||||
if (check_for_changes_thread.is_started()) {
|
||||
check_for_changes_thread.wait_to_finish();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue