Skip to content

Replace call_once with an atomic exchange to log time constant warnings. - #595

Merged
nkoukpaizan merged 1 commit into
developfrom
nicholson/fix-call_once
Sep 29, 2026
Merged

nkoukpaizan merged 1 commit into
developfrom
nicholson/fix-call_once

Conversation

@nkoukpaizan

@nkoukpaizan nkoukpaizan commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This replaces std::once_flag/std::call_once with std::atomic<bool>/ .exchange(true) to log time constant warnings. This should be more portable (including on older linux systems).

Closes #567

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • [N/A] There are unit tests for the new code.
  • [N/A] The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • [N/A] The CHANGELOG.md has been updated to reflect the changes. If this is a minor PR that is part of a larger fix already included in the file, state so.

Further comments

@nkoukpaizan nkoukpaizan self-assigned this Sep 29, 2026
@nkoukpaizan nkoukpaizan added the bug Something isn't working label Sep 29, 2026
@nkoukpaizan
nkoukpaizan marked this pull request as ready for review September 29, 2026 19:34

@Steven-Roberts Steven-Roberts left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This fixes the build issue I had earlier.

@nkoukpaizan
nkoukpaizan merged commit 99e9e63 into develop Sep 29, 2026
6 checks passed
@nkoukpaizan
nkoukpaizan deleted the nicholson/fix-call_once branch September 29, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: std::call_once pthreads linking issue

2 participants