13 auto all = std::move(_queue);
15 while (!
all.Empty()) {
17 ScheduleAndRemove(fiber);
26 ScheduleAndRemove(fiber);
30 YACLIB_DEBUG(!_queue.
Empty(),
"queue must be empty on destruction - potentially deadlock");
34 _queue = std::move(
other._queue);
40 return _queue.
Empty();
bool Empty() const noexcept
void PushBack(Node *node) noexcept
bool Empty() const noexcept
WaitStatus Wait(NoTimeoutTag)
FiberQueue & operator=(FiberQueue &&other) noexcept
void Schedule(detail::fiber::FiberBase *fiber)
static Scheduler * GetScheduler() noexcept
static detail::fiber::FiberBase * Current() noexcept
#define YACLIB_DEBUG(cond, message)
Node * PollRandomElementFromList(BiList &list)
Contract< V, E > MakeContract()
Creates related future and promise.