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

Avoid thread_local on MacOS to prevent issues with hot reload #1594

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Sep 17, 2024

Fixes #1573

This isn't quite right yet. I think the lock_guard for reload is in the right place, but the one in Wrapped::_set_construct_info() is wrong. We need to lock around the whole memnew() operation, not just the part where we set those variables. I'm not sure the best way to do that yet.

UPDATE: This might be OK now. I need to get a good test.

This depends on PR #1590 because it adds another thread_local, and this way we can address that one too

@dsnopek dsnopek added bug This has been identified as a bug platform:macos labels Sep 17, 2024
@dsnopek dsnopek added this to the 4.x milestone Sep 17, 2024
@dsnopek dsnopek requested a review from a team as a code owner September 17, 2024 20:46
@dsnopek dsnopek marked this pull request as draft September 17, 2024 20:46
@dsnopek dsnopek changed the title [DRAFT] Avoid thread_local on MacOS to prevent issues with hot reload Avoid thread_local on MacOS to prevent issues with hot reload Oct 17, 2024
@dsnopek dsnopek marked this pull request as ready for review October 17, 2024 14:07
@dsnopek
Copy link
Collaborator Author

dsnopek commented Oct 17, 2024

Now that PR #1590 is merged, taking this one out of draft!

Copy link
Contributor

@paddy-exe paddy-exe left a comment

Choose a reason for hiding this comment

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

Discussed in the GDExtension meeting and tested by user who created the issue with success.

@dsnopek dsnopek merged commit ca5179f into godotengine:master Oct 29, 2024
12 checks passed
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.

Problems with hot reload
2 participants