Skip to content

Conversation

@Micke632
Copy link

new struct atomic_flag_bool
atomic on/off flag variable

for the classic thread boolean

new struct atomic_flag_bool
atomic on/off flag variable
@Micke632 Micke632 closed this Oct 24, 2025
@Micke632 Micke632 reopened this Oct 24, 2025
@iboB
Copy link
Owner

iboB commented Oct 24, 2025

Thanks for the PR. I don't see how this flag adds much more to std::atomic_flag to warrant an addition. What do you think is an appropriate use case?

@Micke632
Copy link
Author

the usage is for simple on/off scenario , for instance a thread:

while (m_run)
{
}

other thread:
m_run = false;

std::atomic_flag is more specialised for spinlocks etc, can't just read the value.

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