2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 08:25:16 +00:00

[#892] refactored

This commit is contained in:
Razvan Becheriu
2020-02-11 10:17:07 +02:00
parent bc19ae29e7
commit 7d300cabc8
2 changed files with 6 additions and 6 deletions

View File

@@ -803,7 +803,7 @@ Dhcpv4Srv::run() {
}
// destroying the thread pool
if (MultiThreadingUtil::threadCount()) {
if (MultiThreadingMgr::instance().getMode()) {
MultiThreadingMgr::instance().getPktThreadPool().reset();
}
@@ -903,7 +903,7 @@ Dhcpv4Srv::run_one() {
.arg(query->getLabel());
return;
} else {
if (MultiThreadingUtil::threadCount()) {
if (MultiThreadingMgr::instance().getMode()) {
typedef function<void()> CallBack;
boost::shared_ptr<CallBack> call_back =
boost::make_shared<CallBack>(std::bind(&Dhcpv4Srv::processPacketAndSendResponseNoThrow,
@@ -1221,7 +1221,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp, bool allow_packet_park) {
// library unparks the packet.
HooksManager::park("leases4_committed", query,
[this, callout_handle, query, rsp]() mutable {
if (MultiThreadingUtil::threadCount()) {
if (MultiThreadingMgr::instance().getMode()) {
typedef function<void()> CallBack;
boost::shared_ptr<CallBack> call_back =
boost::make_shared<CallBack>(std::bind(&Dhcpv4Srv::sendResponseNoThrow,