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

Remove superfluous and wrong logic to reuse cached load #186

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

RandomShaper
Copy link
Member

With threaded loading you can't try to get the result of a load request multiple times (requests and gets must be balanced). If anything, this code should have called load() in the positive branch of the if, which would return the existing instance of the resource from the cache. However, that's already what would happen anyway in a threaded load, so there's little to no point in handling it specially.

Furthermore, this project is not doing anything to keep the resource in the cache so the check will always fail anyway.

@RandomShaper RandomShaper added this to the 4.0 milestone Jul 15, 2024
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on 4.2.2.stable and 4.3.rc2, it works as expected.

Thanks!

@Calinou Calinou merged commit 690ee91 into godotengine:master Aug 6, 2024
1 check passed
@RandomShaper RandomShaper deleted the fix_res_load branch August 7, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants