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

Partial Fix For Source Generated Queries #55

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

martindevans
Copy link
Contributor

Source generated queries are unusable if multiple worlds are being used. This is because the cached Query object will be used with the wrong World, leading to bad query results. See #54

This fixes that by storing which world the cache is relevant for.

This is only a partial fix. If multiple worlds are being used with multithreading then the cache may be made invalid by another thread while it's in use.

…ed. This is because the cached `Query` object will be used with the wrong `World`, leading to bad query results.

This fixes that by storing which world the cache is relevant for.

This is only a partial fix, the cache is still broken in the case of multithreaded access.
@martindevans
Copy link
Contributor Author

Some discussion on this issue (including another potential fix) in discord, starting here: https://discord.com/channels/1099813114876284928/1100418566706171974/1179232143830945842

@genaray genaray merged commit f533a44 into genaray:master Dec 11, 2023
2 checks passed
@martindevans martindevans deleted the fix_query_world_mismatch branch December 11, 2023 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants