-
Notifications
You must be signed in to change notification settings - Fork 120
Add fast path for teardown check with a shared thread #321
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
Conversation
38b34cf to
64d2e4c
Compare
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
…ceptions in the thread Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
2742c4f to
485c23b
Compare
source/lib/ze_lib.cpp
Outdated
| @@ -1,3 +1,4 @@ | |||
|
|
|||
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.
White space promotes readership?
source/lib/ze_lib.cpp
Outdated
| std::lock_guard<std::mutex> lock(*ze_lib::stabilityMutex); | ||
| *ze_lib::stabilityPromiseResult = std::promise<int>(); | ||
| *ze_lib::resultFutureResult = ze_lib::stabilityPromiseResult->get_future(); | ||
| ze_lib::stabilityCheckThreadStarted->store(1); |
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.
Slight comment for readability, you are using 1 here (likely to indicate RUNNING) and back in the destruction you use -1 as a message to exit the thread. Maybe use define or enums so we can read it easier. :-)
1 = RUNNING
0 = STOPPED? QUISECED?
-1 = EXIT_THREAD?
rwmcguir
left a comment
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.
Overall looks pretty good, my commentary can be approved tomorrow if we really don't want to change anything, since it is not functional.
f0f1c03 to
1b1146d
Compare
…ests Signed-off-by: Neil R. Spruit <[email protected]>
1b1146d to
c038c59
Compare
No description provided.