19 #include <boost/intrusive/list.hpp> 25 #include <glog/logging.h> 41 }
catch (
const std::exception& ex) {
42 LOG(ERROR) <<
"TimeoutManager::runAfterDelay() callback threw " 43 <<
typeid(ex).
name() <<
" exception: " << ex.what();
45 LOG(ERROR) <<
"TimeoutManager::runAfterDelay() callback threw " 46 <<
"non-exception type";
58 using ListHook = boost::intrusive::list_member_hook<
59 boost::intrusive::link_mode<boost::intrusive::auto_unlink>>;
63 boost::intrusive::member_hook<CobTimeout, ListHook, &CobTimeout::hook>,
64 boost::intrusive::constant_time_size<false>>;
79 "error in TimeoutManager::runAfterDelay(), failed to schedule timeout");
92 std::make_unique<CobTimeouts::CobTimeout>(
this,
std::move(cob),
internal);
93 if (!
timeout->scheduleTimeout(milliseconds)) {
constexpr detail::Map< Move > move
bool tryRunAfterDelay(Func cob, uint32_t milliseconds, InternalEnum internal=InternalEnum::NORMAL)
virtual ~TimeoutManager()
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
void timeoutExpired() noexceptoverride
Encoder::MutableCompressedList list
boost::intrusive::list_member_hook< boost::intrusive::link_mode< boost::intrusive::auto_unlink >> ListHook
CobTimeout(TimeoutManager *timeoutManager, Func cob, InternalEnum internal)
std::enable_if<!std::is_array< T >::value, std::unique_ptr< T > >::type make_unique(Args &&...args)
std::unique_ptr< CobTimeouts > cobTimeouts_
void runAfterDelay(Func cob, uint32_t milliseconds, InternalEnum internal=InternalEnum::NORMAL)
void throwSystemError(Args &&...args)
boost::intrusive::list< CobTimeout, boost::intrusive::member_hook< CobTimeout, ListHook,&CobTimeout::hook >, boost::intrusive::constant_time_size< false >> List