1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Rationalize busy waits

This commit is contained in:
Pedro J. Estébanez
2024-10-31 11:09:20 +01:00
parent 44fa552343
commit 4f8dd96b3d
7 changed files with 30 additions and 22 deletions

View File

@@ -394,9 +394,7 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
if (p_replace_previous) {
// Force sync last line update (skip if number of unprocessed log messages is too large to avoid editor lag).
if (log->get_pending_paragraphs() < 100) {
while (!log->is_finished()) {
::OS::get_singleton()->delay_usec(1);
}
log->wait_until_finished();
}
}