You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Merge pull request #107620 from bruvzg/imp_deadlock
Fix deadlock in `EditorFileSystem::reimport_files`.
This commit is contained in:
@@ -3262,11 +3262,13 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
|
||||
|
||||
int imported_count = 0;
|
||||
while (true) {
|
||||
ep->step(reimport_files[imported_count].path.get_file(), from + imported_count, false);
|
||||
imported_sem.wait();
|
||||
do {
|
||||
imported_count++;
|
||||
} while (imported_sem.try_wait());
|
||||
while (true) {
|
||||
ep->step(reimport_files[imported_count].path.get_file(), from + imported_count, false);
|
||||
if (imported_sem.try_wait()) {
|
||||
imported_count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (imported_count == item_count) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user