-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Support loading of translations on threads #78747
Support loading of translations on threads #78747
Conversation
Can confirm that this fixes #78689 for me |
I think this fix introduces a regression:
registers as a translation of the locale |
Here's a MRP showing the regression: Note that this only happens when a translation is made with |
bcf3058
to
5301bbb
Compare
I've updated the PR (including the description). Both cases should work now. |
This one would be good for 4.2 dev builds. |
Thanks! |
Cherry-picked for 4.1.3. |
Resources can safely do deferred calls from threads in the context of resource loading. The
ResourceLoader
has a mechanism in place to make them eventually run on the main thread, safely. With this PR, the patched call can benefit from it.That said, ideally we would have a safety net in some other layer of the engine. We are patching this call because we know that its current implementation leads to thread-unsafe calls along the call chain. In other words, this fix is a bit flimsy as it relies too much on implementation details of other classes. UPDATE: Implementation changed to move the threading concern to the resource class instead of the translation loader; I'm a bit happier with this, but none should be having to care about that, to be honest.
Fixes #78689 (but testing is needed to confirm; can anyone check?).