Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make loading translations from threads safe #99527

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

RandomShaper
Copy link
Member

Fixes #98577.

Note that when loading a translation from a thread, by the time the load is reported to be complete, the NOTIFICATION_TRANSLATION_CHANGED may have not been delivered yet. That will happen the next time the message queue is flushed, so no later than one frame. However, if that's an issue, I can add some extra logic so resource classes have a way to communicate the ResourceLoader it shouldn't call the load complete until some condition has been met. That's what happens with the resource changed mechanism, for instance.

@RandomShaper RandomShaper added bug topic:core cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Nov 22, 2024
@RandomShaper RandomShaper added this to the 4.4 milestone Nov 22, 2024
@RandomShaper RandomShaper requested a review from a team as a code owner November 22, 2024 08:48
@Repiteo Repiteo merged commit e7b11d1 into godotengine:master Nov 22, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 22, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:i18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when loading translations with ResourceLoader.load_threaded_request
4 participants