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

对代码的一些疑问 #51

Open
Mrtj2016 opened this issue Sep 21, 2019 · 5 comments
Open

对代码的一些疑问 #51

Mrtj2016 opened this issue Sep 21, 2019 · 5 comments

Comments

@Mrtj2016
Copy link

你好!
我看CMakeLists.txt文件里ThreadPool.cpp被注释掉了,难道没有用到吗。

@Mrtj2016
Copy link
Author

Mrtj2016 commented Sep 23, 2019

你好!
我在看Epoll的时候,存在一点疑问。

  1. 对于getEventsRequest(int)函数,我觉得这个函数是不是可以写入poll()函数中,免得还得拷贝vector

  2. getEventsRequest(int)函数为什么要执行setEvents(0)

@Mrtj2016 Mrtj2016 changed the title 关于线程池 对代码的一些疑问 Sep 23, 2019
@Mrtj2016
Copy link
Author

Mrtj2016 commented Sep 25, 2019

你好!
我在看日志相关的代码时差生了一些疑问,能否请您解答一下。
LoggingTest.cpp中是没有设置Log的filename,运行会直接报错。

@linyacool
Copy link
Owner

@Mrtj2016 ThreadPool是最开始写的时候用的,后来没用,但是没舍得删哈~

@linyacool
Copy link
Owner

@Mrtj2016 1.不会copy的,这里会有rvo优化。
2.setEvents(0)是因为拿到事件了就不期望在这段时间内再监控任何事件。

@linyacool
Copy link
Owner

@Mrtj2016 sudo试试吧,我后面抽时间把代码路径整体过一遍,当时直接用root搞的

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

No branches or pull requests

2 participants