Summary:
This allows an EventBase to exit loop() even if there are pending timeouts in the timer (make sure to cancelAll before deleting!)
Test Plan: Unit tests
Reviewed By: davejwatson@fb.com
Subscribers: doug, folly-diffs@, yfeldblum, chalfant
FB internal diff:
D2111942
Signature: t1:
2111942:
1432934212:
7ac1973bdbbfdbda714699ab373618399f29ef76
}
HHWheelTimer::HHWheelTimer(folly::EventBase* eventBase,
- std::chrono::milliseconds intervalMS)
- : AsyncTimeout(eventBase)
+ std::chrono::milliseconds intervalMS,
+ AsyncTimeout::InternalEnum internal)
+ : AsyncTimeout(eventBase, internal)
, interval_(intervalMS)
, nextTick_(1)
, count_(0)
static int DEFAULT_TICK_INTERVAL;
explicit HHWheelTimer(folly::EventBase* eventBase,
std::chrono::milliseconds intervalMS =
- std::chrono::milliseconds(DEFAULT_TICK_INTERVAL));
+ std::chrono::milliseconds(DEFAULT_TICK_INTERVAL),
+ AsyncTimeout::InternalEnum internal =
+ AsyncTimeout::InternalEnum::NORMAL);
/**
* Destroy the HHWheelTimer.