You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Fix deadlock in EditorFileSystem::reimport_files.
This commit is contained in:
@@ -3247,12 +3247,14 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
|
||||
WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &EditorFileSystem::_reimport_thread, &tdata, item_count, -1, false, vformat(TTR("Import resources of type: %s"), reimport_files[from].importer));
|
||||
|
||||
int imported_count = 0;
|
||||
while (true) {
|
||||
while (true) {
|
||||
ep->step(reimport_files[imported_count].path.get_file(), from + imported_count, false);
|
||||
imported_sem.wait();
|
||||
do {
|
||||
if (imported_sem.try_wait()) {
|
||||
imported_count++;
|
||||
} while (imported_sem.try_wait());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (imported_count == item_count) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user