event/Loop: use IntrusiveList instead of boost::intrusive::list

This commit is contained in:
Max Kellermann 2022-11-10 11:56:27 +01:00
parent 1da8faa285
commit b3c5e6a3cc
2 changed files with 3 additions and 10 deletions

View File

@ -21,8 +21,7 @@
#define MPD_INJECT_EVENT_HXX #define MPD_INJECT_EVENT_HXX
#include "util/BindMethod.hxx" #include "util/BindMethod.hxx"
#include "util/IntrusiveList.hxx"
#include <boost/intrusive/list_hook.hpp>
class EventLoop; class EventLoop;
@ -31,8 +30,7 @@ class EventLoop;
* *
* This class is thread-safe. * This class is thread-safe.
*/ */
class InjectEvent final class InjectEvent final : public SafeLinkIntrusiveListHook
: public boost::intrusive::list_base_hook<>
{ {
friend class EventLoop; friend class EventLoop;

View File

@ -33,8 +33,6 @@
#include "WakeFD.hxx" #include "WakeFD.hxx"
#include "thread/Id.hxx" #include "thread/Id.hxx"
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include <boost/intrusive/list.hpp>
#endif #endif
#include <atomic> #include <atomic>
@ -80,10 +78,7 @@ class EventLoop final
#ifdef HAVE_THREADED_EVENT_LOOP #ifdef HAVE_THREADED_EVENT_LOOP
Mutex mutex; Mutex mutex;
using InjectList = using InjectList = IntrusiveList<InjectEvent>;
boost::intrusive::list<InjectEvent,
boost::intrusive::base_hook<boost::intrusive::list_base_hook<>>,
boost::intrusive::constant_time_size<false>>;
InjectList inject; InjectList inject;
#endif #endif