jonnxu commented on a change in pull request #156: [ISSUE #137] split
TcpRemotingClient::m_ioService into m_dispatchService and m_handleService
URL:
https://github.com/apache/rocketmq-client-cpp/pull/156#discussion_r294050729
##########
File path: src/transport/TcpRemotingClient.cpp
##########
@@ -29,17 +29,29 @@ namespace rocketmq {
//<!************************************************************************
TcpRemotingClient::TcpRemotingClient(int pullThreadNum, uint64_t
tcpConnectTimeout, uint64_t tcpTransportTryLockTimeout)
- : m_pullThreadNum(pullThreadNum),
+ : m_dispatchThreadNum(1),
+ m_pullThreadNum(pullThreadNum),
m_tcpConnectTimeout(tcpConnectTimeout),
m_tcpTransportTryLockTimeout(tcpTransportTryLockTimeout),
m_namesrvIndex(0),
- m_ioServiceWork(m_ioService) {
+ m_dispatchServiceWork(m_dispatchService),
+ m_handleServiceWork(m_handleService) {
#if !defined(WIN32) && !defined(__APPLE__)
string taskName = UtilAll::getProcessName();
+ prctl(PR_SET_NAME, "DispatchTP", 0, 0, 0);
+#endif
+ for (int i = 0; i != m_dispatchThreadNum; ++i) {
Review comment:
i < m_dispatchThreadNum is more safety than i!= m_dispatchThreadNum, it can
handle the situation when some one change the i in {]
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services