Skip to content

Commit e237d8b

Browse files
ifplusorShannonDing
authored andcommitted
replace boost::thread::hardware_concurrency with std::thread::hardware_concurrency. (#171)
1 parent ce126b7 commit e237d8b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/common/MQClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ MQClient::MQClient() {
4141
m_instanceName = "DEFAULT";
4242
m_clientFactory = NULL;
4343
m_serviceState = CREATE_JUST;
44-
m_pullThreadNum = boost::thread::hardware_concurrency();
44+
m_pullThreadNum = std::thread::hardware_concurrency();
4545
m_tcpConnectTimeout = 3000; // 3s
4646
m_tcpTransportTryLockTimeout = 3; // 3s
4747
m_unitName = "";

src/consumer/DefaultMQPushConsumer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ DefaultMQPushConsumer::DefaultMQPushConsumer(const string& groupname)
205205
setMessageModel(CLUSTERING);
206206

207207
m_startTime = UtilAll::currentTimeMillis();
208-
m_consumeThreadCount = boost::thread::hardware_concurrency();
209-
m_pullMsgThreadPoolNum = boost::thread::hardware_concurrency();
208+
m_consumeThreadCount = std::thread::hardware_concurrency();
209+
m_pullMsgThreadPoolNum = std::thread::hardware_concurrency();
210210
m_async_service_thread.reset(new boost::thread(boost::bind(&DefaultMQPushConsumer::boost_asio_work, this)));
211211
}
212212

0 commit comments

Comments
 (0)