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

question atomic #9

Open
Amathnet opened this issue Feb 27, 2022 · 0 comments
Open

question atomic #9

Amathnet opened this issue Feb 27, 2022 · 0 comments

Comments

@Amathnet
Copy link

std::atomic<bool> active{true};

Hey,
why is this initialized to true this does not make any sense to me. Like this there is no way to check if its already running.
I use it in a loop and need to check if the timer is already running.

And why is there no function to check if its already running? I use function like this.
bool Timer::state() { return active; }

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

No branches or pull requests

1 participant