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
Fixing problems as reported by clang-check. #1889
Conversation
sithhell
commented
Dec 1, 2015
- Fixing memory leaks - Removing unused variables - Fixing potential division by zero bugs
@@ -125,7 +125,8 @@ struct HPX_EXPORT big_boot_barrier : boost::noncopyable | |||
|
|||
void add_thunk(util::unique_function_nonser<void()>* f) | |||
{ | |||
thunks.push(f); | |||
while(!thunks.push(f)) | |||
; // Wait until succesfully pushed ... |
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.
This should time out with an error and not sit indefinitely.
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.
In hpx/runtime/agas/big_boot_barrier.hpp:
@@ -125,7 +125,8 @@ struct HPX_EXPORT big_boot_barrier : boost::noncopyable
void add_thunk(util::unique_function_nonser<void()>* f) {
thunks.push(f);
while(!thunks.push(f))
; // Wait until succesfully pushed ...
This should time out with an error and not sit indefinitely.
push is guaranteed to succeed eventually, iiuc. Should we really time out
and throw here?
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.
push is guaranteed to succeed eventually, iiuc. Should we really time out and throw here?
Not sure. I usually try to avoid things like that. Smells like a live-lock...
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.
Yes, I think having an additional exponential back off mechanism might help to improve the picture.
@sithhell Can this be merged now? |
All comments have been addressed. |
…mory leak warning
222d26c
to
ac9c127
Compare
LGTM, thanks! |
Fixing problems as reported by clang-check.