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

Add nothreads feature tag to signify lack of THREADS_ENABLED #93563

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

mihe
Copy link
Contributor

@mihe mihe commented Jun 24, 2024

As talked about in #93556.

This adds a new feature tag to OS::has_feature called nothreads, which complements the existing threads feature tag that's meant to signify whether the particular builds has THREADS_ENABLED defined or not, meaning whether it's been built with threads=yes.

This can help define things that should only apply to single-threaded builds (likely web builds), like project settings overrides or specific GDExtension binaries.

Copy link
Member

@RandomShaper RandomShaper left a comment

Choose a reason for hiding this comment

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

Makes sense. Even if in a future release we add some syntax to negate features, we could keep this hardcoded one as a backcompat.

@akien-mga akien-mga merged commit 6b281c0 into godotengine:master Jun 25, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@mihe mihe deleted the nothreads-feature branch June 25, 2024 08:11
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.

4 participants