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 once #68

Merged
merged 6 commits into from
Jul 25, 2024
Merged

Fix once #68

merged 6 commits into from
Jul 25, 2024

Conversation

planetis-m
Copy link
Contributor

No description provided.

@planetis-m
Copy link
Contributor Author

i have also kept a lockless alternative that will pbl burn your cpu https://github.com/planetis-m/dumpster/blob/master/multithread/once.nim

@planetis-m
Copy link
Contributor Author

I think unlike the previous version atomics are not needed here, since the state variable is always accessed with a lock. No idea why the libcxx implementation has them.

@planetis-m
Copy link
Contributor Author

@Araq .

@Araq Araq merged commit 6a9557e into nim-lang:master Jul 25, 2024
12 checks passed
@planetis-m planetis-m deleted the fix-once branch July 25, 2024 21:08
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.

2 participants