-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
runinloop问题 #141
Comments
可以直接调的,用runInLoop的原因只是因为这样不用动脑,并且一定不会错,follow自己的风格就好了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HttpData.cpp 的 handleConn() 函数中:
loop_->runInLoop(bind(&HttpData::handleClose, shared_from_this()));
这里用 runinloop 真的有必要吗,因为这里loop_ 就是 HttpData 内指向本 eventloop 的指针,可以确定是在本线程(eventloop)执行的吧。所以跟直接调用 handleClose() 有什么区别?
The text was updated successfully, but these errors were encountered: