event/TimerEvent: use auto_unlink hook

This commit is contained in:
Max Kellermann
2020-10-08 17:27:15 +02:00
parent 22bea5c97e
commit 263b0ffdbb
4 changed files with 6 additions and 23 deletions

View File

@@ -64,7 +64,7 @@ class EventLoop final : SocketMonitor
using TimerSet =
boost::intrusive::multiset<TimerEvent,
boost::intrusive::base_hook<boost::intrusive::set_base_hook<>>,
boost::intrusive::base_hook<boost::intrusive::set_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>>,
boost::intrusive::compare<TimerCompare>,
boost::intrusive::constant_time_size<false>>;
TimerSet timers;
@@ -186,7 +186,6 @@ public:
void AddTimer(TimerEvent &t,
std::chrono::steady_clock::duration d) noexcept;
void CancelTimer(TimerEvent &t) noexcept;
/**
* Schedule a call to DeferEvent::RunDeferred().