lhsoft commented on issue #3030:
URL: https://github.com/apache/brpc/issues/3030#issuecomment-3101388609
@chenBright @zhengJade 这个修复的话,epoll
thread调用callback的时候不传递自身attr,只传递normal应该就可以修复了,这里callback函数传递thread attr的目的是?
```
for (int i = 0; i < n; ++i) {
if (e[i].events & (EPOLLIN | EPOLLERR | EPOLLHUP)
#ifdef BRPC_SOCKET_HAS_EOF
|| (e[i].events & has_epollrdhup)
#endif
) {
int64_t start_ns = butil::cpuwide_time_ns();
// We don't care about the return value.
CallInputEventCallback(e[i].data.u64, e[i].events,
_thread_attr);
(*g_edisp_read_lantency) << (butil::cpuwide_time_ns() -
start_ns);
}
}
for (int i = 0; i < n; ++i) {
if (e[i].events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) {
int64_t start_ns = butil::cpuwide_time_ns();
// We don't care about the return value.
CallOutputEventCallback(e[i].data.u64, e[i].events,
_thread_attr);
(*g_edisp_write_lantency) << (butil::cpuwide_time_ns() -
start_ns);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]