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

ResourceLoader: Let the caller thread use its own message queue override #93124

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

RandomShaper
Copy link
Member

This allows for extra flexibility in certain (advanced) use cases, where the user may want to exert greater control over the "queued-update-like" actions happening during resource loading. These advanced APIs are not exposed yet, though. Also, this is also a fix as there's no notion of a stack of call queue overrides that can be pushed and popped, and ResourceLoader would otherwise be recklessly overriding any currently set, reverting back to the main queue otherwise.

The change has a base commit that fixes the fact that the WorkerThreadPool wasn't considering the thread call queue override as part of the thread-wide state to restore in case a task has overridden it. Such commit is a bugfix by itself as well.

@RandomShaper RandomShaper added this to the 4.3 milestone Jun 13, 2024
@RandomShaper RandomShaper requested a review from a team as a code owner June 13, 2024 08:39
@akien-mga akien-mga merged commit 087ef4b into godotengine:master Jun 14, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@RandomShaper RandomShaper deleted the skull_trio branch June 18, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants