event/DeferEvent: use class IntrusiveList instead of boost::intrusive::list

This commit is contained in:
Max Kellermann
2020-12-01 16:56:58 +01:00
parent 774b4313f2
commit 990f2dc1cf
4 changed files with 25 additions and 49 deletions

View File

@@ -79,11 +79,9 @@ class EventLoop final
boost::intrusive::constant_time_size<false>>;
TimerSet timers;
using DeferList =
boost::intrusive::list<DeferEvent,
boost::intrusive::base_hook<boost::intrusive::list_base_hook<>>,
boost::intrusive::constant_time_size<false>>;
DeferList deferred;
using DeferList = IntrusiveList<DeferEvent>;
DeferList defer;
using IdleList = IntrusiveList<IdleEvent>;
IdleList idle;
@@ -214,12 +212,6 @@ public:
*/
void AddDeferred(DeferEvent &d) noexcept;
/**
* Cancel a pending call to DeferEvent::RunDeferred().
* However after returning, the call may still be running.
*/
void RemoveDeferred(DeferEvent &d) noexcept;
#ifdef HAVE_THREADED_EVENT_LOOP
/**
* Schedule a call to the InjectEvent.