Commit e3270dfd authored by Max Kellermann's avatar Max Kellermann

event/SocketEvent: use class IntrusiveList<>

parent a14997ff
...@@ -91,10 +91,7 @@ class EventLoop final ...@@ -91,10 +91,7 @@ class EventLoop final
DeferredList deferred; DeferredList deferred;
#endif #endif
using SocketList = using SocketList = IntrusiveList<SocketEvent>;
boost::intrusive::list<SocketEvent,
boost::intrusive::base_hook<boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>>,
boost::intrusive::constant_time_size<false>>;
/** /**
* A list of scheduled #SocketEvent instances, without those * A list of scheduled #SocketEvent instances, without those
......
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "PollGroup.hxx" #include "PollGroup.hxx"
#include "net/SocketDescriptor.hxx" #include "net/SocketDescriptor.hxx"
#include "util/BindMethod.hxx" #include "util/BindMethod.hxx"
#include "util/IntrusiveList.hxx"
#include <boost/intrusive/list_hook.hpp>
#include <cassert> #include <cassert>
#include <cstddef> #include <cstddef>
...@@ -45,8 +44,9 @@ class EventLoop; ...@@ -45,8 +44,9 @@ class EventLoop;
* thread that runs the #EventLoop, except where explicitly documented * thread that runs the #EventLoop, except where explicitly documented
* as thread-safe. * as thread-safe.
*/ */
class SocketEvent final : public boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>> { class SocketEvent final : IntrusiveListHook {
friend class EventLoop; friend class EventLoop;
friend class IntrusiveList<SocketEvent>;
EventLoop &loop; EventLoop &loop;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment