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_r294050741
 
 

 ##########
 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) {
+    
m_dispatchThreadPool.create_thread(boost::bind(&boost::asio::io_service::run, 
&m_dispatchService));
+  }
+#if !defined(WIN32) && !defined(__APPLE__)
+  prctl(PR_SET_NAME, taskName.c_str(), 0, 0, 0);
+#endif
+
+#if !defined(WIN32) && !defined(__APPLE__)
   prctl(PR_SET_NAME, "NetworkTP", 0, 0, 0);
 #endif
   for (int i = 0; i != m_pullThreadNum; ++i) {
 
 Review comment:
   the same as pre suggestion

----------------------------------------------------------------
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

Reply via email to