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
Remove C++03 zombies #304
Remove C++03 zombies #304
Conversation
You have to rebase, I think the first commit was already merged. |
76e93e1
to
c34ba83
Compare
while (!predicate(_value)) | ||
_cond.wait(); | ||
const T _wait(const F& predicate) const | ||
{ |
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.
Why have you removed the lock free check?
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.
Premature optimization which would be harder to retain with C++11 primitives.
@@ -21,99 +21,81 @@ namespace lunchbox | |||
template <typename T, size_t S> | |||
MTQueue<T, S>& MTQueue<T, S>::operator=(const MTQueue<T, S>& from) |
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.
Add a move assignment and constructor?
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.
done
lunchbox/mtQueue.ipp
Outdated
_maxSize = maxSize; | ||
_cond.signal(); | ||
_cond.unlock(); | ||
_condition.notify_one(); |
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.
why not notify_all?
8d750ff
to
f196472
Compare
No description provided.