Deprecate EventMgr::QueueEvent() and update usages to Enqueue()

This commit is contained in:
Jon Siwek 2020-03-25 13:07:30 -07:00
parent b667c637df
commit 0db484cc7a
14 changed files with 164 additions and 128 deletions

View file

@ -3897,7 +3897,8 @@ ScheduleTimer::~ScheduleTimer()
void ScheduleTimer::Dispatch(double /* t */, int /* is_expire */)
{
mgr.QueueUncheckedEvent(event, std::move(args), SOURCE_LOCAL, 0, tmgr);
if ( event )
mgr.Enqueue(event, std::move(args), SOURCE_LOCAL, 0, tmgr);
}
ScheduleExpr::ScheduleExpr(IntrusivePtr<Expr> arg_when,
@ -4443,7 +4444,10 @@ IntrusivePtr<Val> EventExpr::Eval(Frame* f) const
return nullptr;
auto v = eval_list(f, args.get());
mgr.QueueUncheckedEvent(handler, std::move(*v));
if ( handler )
mgr.Enqueue(handler, std::move(*v));
return nullptr;
}