EditorResourcePreview: Let loads complete after exit requested

This commit is contained in:
Pedro J. Estébanez 2024-09-13 12:19:06 +02:00
parent e3ddf3d44a
commit f31867d2b9

View File

@ -533,8 +533,10 @@ void EditorResourcePreview::stop() {
}
while (!exited.is_set()) {
// Sync pending work.
OS::get_singleton()->delay_usec(10000);
RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on rendering server
RenderingServer::get_singleton()->sync();
MessageQueue::get_singleton()->flush();
}
thread.wait_to_finish();