-
Notifications
You must be signed in to change notification settings - Fork 247
Make cross-thread run/status flags std::atomic (#3798 batches A/B) #3800
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,7 @@ | |
| #pragma once | ||
| #include <vector> | ||
| #include <algorithm> | ||
| #include <atomic> | ||
| #ifdef _WIN32 | ||
| # include <winsock2.h> | ||
| # include <ws2tcpip.h> | ||
|
|
@@ -1352,11 +1353,11 @@ class CHighPrecisionTimer : public QThread | |
| protected: | ||
| virtual void run(); | ||
|
|
||
| bool bRun; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not part of all this -- we need better names than reusing (I'd only apply this to Class-scope variables: method variables can do whatever they want.) |
||
| std::atomic<bool> bRun; | ||
|
|
||
| # if defined( __APPLE__ ) || defined( __MACOSX ) | ||
| uint64_t Delay; | ||
| uint64_t NextEnd; | ||
| uint64_t Delay; | ||
| uint64_t NextEnd; | ||
| # else | ||
| long Delay; | ||
| timespec NextEnd; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here -- we shouldn't have two distinct concepts with the same identity (i.e. variable name). Not part of this PR.