-
Notifications
You must be signed in to change notification settings - Fork 121
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
[ZEND-569] Remove boost threads from networking system #612
Conversation
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.
Thank you for the PR. Great improvement with getting rid of all the Millisleep
s around, and of unneeded boost threads!
Looks good to me!
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.
Please consider addressing the two comments I left, they could make things a little bit simpler to read and maintain.
Thanks
587482a
to
da73f97
Compare
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.
The "CThreadInterrupt" class could also throw an exception just like boost::interrupt does. It works better when interrupt is nested in function calls. Still if a thread was interrupted it can be achieved by if (interrupted) throw error but requires more syntax. So for our needs it's enough.
LGTM, thanks.
…vert to std::thread (This compiles but shouldn't work yet)
(This compiles but shouldn't work yet)
(This compiles but shouldn't work yet)
(This compiles but shouldn't work yet)
da73f97
to
e2591b7
Compare
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.
The PR is fine to.
Thanks
This PR removes all the instances of
boost::thread
from the networking subsystem, in favor of STL<thread>
library.One key difference between the libraries is that
boost::thread
s are interruptible; this feature has been replicated by the newly introduced classCThreadInterrupt
.The PR also removes the
boost::condition_variable
as well, preferring the STL equivalent.Finally,
boost::thread_group
has been removed as well, but it has not been replaced with anything equivalent.