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

Fix Platform Thread Override #53044

Merged
merged 1 commit into from
Sep 29, 2021
Merged

Conversation

lucypero
Copy link
Contributor

@lucypero lucypero commented Sep 25, 2021

Fixes #52734

This way, Scons knows about whatever header you include in platform_thread.h (which can be created in platform/[platform])

In the linked PR, Scons has no way of detecting changes in PLATFORM_CUSTOM_THREAD_H

@lucypero lucypero requested a review from a team as a code owner September 25, 2021 00:29
@YeldhamDev YeldhamDev added this to the 4.0 milestone Sep 25, 2021
@punto-
Copy link
Contributor

punto- commented Sep 25, 2021

This is an old issue with sons, having a define poiting to a header messes with scons dependency resolution, scons doesn't see the header in the macro as a dependency. We dealt with this prevously on the refcount file:

https://github.com/godotengine/godot/blob/2.0/core/safe_refcount.h#L94

Because those couldn't be implemented in a virtual class. Ideally this would also be a virtual class, but since it's not, this was the best solution.

edit: maybe we can add a comment to clarify that platform_thread.h is in platform/ ?

@lucypero lucypero force-pushed the thread_override branch 2 times, most recently from 828a1fa to 78bcd67 Compare September 28, 2021 22:13
core/os/thread.h Outdated Show resolved Hide resolved
core/os/thread.cpp Outdated Show resolved Hide resolved
@akien-mga akien-mga added cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:porting labels Sep 29, 2021
@akien-mga akien-mga merged commit 4028583 into godotengine:master Sep 29, 2021
@akien-mga
Copy link
Member

Thanks!

@lucypero lucypero deleted the thread_override branch September 30, 2021 18:24
@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Oct 4, 2021
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