33 #include <boost/multi_index/indexed_by.hpp> 34 #include <boost/multi_index/member.hpp> 35 #include <boost/multi_index/ordered_index.hpp> 36 #include <boost/multi_index_container.hpp> 43 typedef std::function<void(Id, int64_t)>
Callback;
112 typedef boost::multi_index_container<
114 boost::multi_index::indexed_by<
115 boost::multi_index::ordered_unique<
116 boost::multi_index::member<Event, Id, &Event::id>>,
117 boost::multi_index::ordered_non_unique<
118 boost::multi_index::member<Event, int64_t, &Event::expiration>>>>
int64_t runOnce(int64_t now)
int64_t runLoop(int64_t now)
Id add(int64_t now, int64_t delay, Callback callback)
std::chrono::steady_clock::time_point now()
—— Concurrent Priority Queue Implementation ——
int64_t nextExpiration() const
std::function< void(Id, int64_t)> Callback
boost::multi_index_container< Event, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< Event, Id,&Event::id > >, boost::multi_index::ordered_non_unique< boost::multi_index::member< Event, int64_t,&Event::expiration > > > > Set
Id addRepeating(int64_t now, int64_t interval, Callback callback)
TimeoutQueue & operator=(const TimeoutQueue &)=delete
int64_t runInternal(int64_t now, bool runOnce)