assert(wheel_->count_ == 0);
wheel_->AsyncTimeout::cancelTimeout();
}
- hook_.unlink();
+ unlink();
if ((-1 != bucket_) && (wheel_->buckets_[0][bucket_].empty())) {
auto bi = makeBitIterator(wheel_->bitmap_.begin());
*(bi + bucket_) = false;
/**
* A callback to be notified when a timeout has expired.
*/
- class Callback {
+ class Callback
+ : public boost::intrusive::list_base_hook<
+ boost::intrusive::link_mode<boost::intrusive::auto_unlink>> {
public:
Callback()
: wheel_(nullptr)
std::chrono::milliseconds expiration_;
int bucket_{-1};
- typedef boost::intrusive::list_member_hook<
- boost::intrusive::link_mode<boost::intrusive::auto_unlink> > ListHook;
-
- ListHook hook_;
-
typedef boost::intrusive::list<
Callback,
- boost::intrusive::member_hook<Callback, ListHook, &Callback::hook_>,
boost::intrusive::constant_time_size<false> > List;
std::shared_ptr<RequestContext> context_;