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

Remove C++03 zombies #304

Merged
merged 2 commits into from Feb 23, 2017
Merged

Remove C++03 zombies #304

merged 2 commits into from Feb 23, 2017

Conversation

eile
Copy link
Member

@eile eile commented Feb 21, 2017

No description provided.

@hernando
Copy link

You have to rebase, I think the first commit was already merged.

@eile eile force-pushed the master branch 2 times, most recently from 76e93e1 to c34ba83 Compare February 21, 2017 10:35
while (!predicate(_value))
_cond.wait();
const T _wait(const F& predicate) const
{

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?

Copy link
Member Author

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)

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

_maxSize = maxSize;
_cond.signal();
_cond.unlock();
_condition.notify_one();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not notify_all?

@eile eile merged commit f05b9c6 into Eyescale:master Feb 23, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants