mpd/src/event/DeferEvent.cxx
2023-03-12 20:02:54 +01:00

24 lines
360 B
C++

// SPDX-License-Identifier: BSD-2-Clause
// author: Max Kellermann <max.kellermann@gmail.com>
#include "DeferEvent.hxx"
#include "Loop.hxx"
void
DeferEvent::Schedule() noexcept
{
if (!IsPending())
loop.AddDefer(*this);
assert(IsPending());
}
void
DeferEvent::ScheduleIdle() noexcept
{
if (!IsPending())
loop.AddIdle(*this);
assert(IsPending());
}