Skip to content

Added thread local wrapper #1667

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

Merged
merged 9 commits into from
May 8, 2025

Conversation

reOiL
Copy link
Contributor

@reOiL reOiL commented May 6, 2025

Why: because its easy replace without workarounds like overload all possible operators

Interface: DAS_THREAD_LOCAL(<Type>)

@borisbat
Copy link
Collaborator

borisbat commented May 6, 2025

lets at least add a macro. those magic numbers are not very readable

@borisbat
Copy link
Collaborator

borisbat commented May 6, 2025

also, we need 2nd define. to enable\disable all this machinery, and roll back to the regular threadlocal

@reOiL
Copy link
Contributor Author

reOiL commented May 7, 2025

also, we need 2nd define. to enable\disable all this machinery, and roll back to the regular threadlocal

The idea is just a common interface for thread_local. Making a backport for thread_local X is not possible because we will have to redefine all potentially used operators/methods + some language constructs will not be possible, for example auto X = MyThreadLocal.

@borisbat borisbat merged commit cc3ee37 into GaijinEntertainment:master May 8, 2025
17 checks passed
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.

2 participants