mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Move threading classes to zeek namespaces
This commit is contained in:
parent
f310795d79
commit
1262109e5a
42 changed files with 299 additions and 210 deletions
|
@ -8,7 +8,8 @@
|
|||
#include "Event.h"
|
||||
#include "IPAddr.h"
|
||||
|
||||
using namespace threading;
|
||||
namespace zeek::threading {
|
||||
namespace detail {
|
||||
|
||||
void HeartbeatTimer::Dispatch(double t, bool is_expire)
|
||||
{
|
||||
|
@ -19,6 +20,8 @@ void HeartbeatTimer::Dispatch(double t, bool is_expire)
|
|||
thread_mgr->StartHeartbeatTimer();
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
Manager::Manager()
|
||||
{
|
||||
DBG_LOG(zeek::DBG_THREADING, "Creating thread manager ...");
|
||||
|
@ -127,7 +130,7 @@ void Manager::SendHeartbeats()
|
|||
void Manager::StartHeartbeatTimer()
|
||||
{
|
||||
heartbeat_timer_running = true;
|
||||
zeek::detail::timer_mgr->Add(new HeartbeatTimer(network_time + zeek::BifConst::Threading::heartbeat_interval));
|
||||
zeek::detail::timer_mgr->Add(new detail::HeartbeatTimer(network_time + zeek::BifConst::Threading::heartbeat_interval));
|
||||
}
|
||||
|
||||
// Raise everything in here as warnings so it is passed to scriptland without
|
||||
|
@ -269,3 +272,5 @@ const threading::Manager::msg_stats_list& threading::Manager::GetMsgThreadStats(
|
|||
|
||||
return stats;
|
||||
}
|
||||
|
||||
} // namespace zeek::threading
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue