MCPcopy Create free account
hub / github.com/catboost/catboost / WakeTimedout

Method WakeTimedout

library/cpp/coroutine/engine/cont_poller.cpp:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30
31 TInstant TEventWaitQueue::WakeTimedout(TInstant now) noexcept {
32 TIoWait::TIterator it = IoWait_.Begin();
33
34 if (it != IoWait_.End()) {
35 if (it->DeadLine() > now) {
36 return it->DeadLine();
37 }
38
39 do {
40 (it++)->Wake(ETIMEDOUT);
41 } while (it != IoWait_.End() && it->DeadLine() <= now);
42 }
43
44 return now;
45 }
46
47 void TEventWaitQueue::Register(NCoro::TContPollEvent* event) {
48 IoWait_.Insert(event);

Callers 2

TestEventQueueMethod · 0.80
WaitForIOMethod · 0.80

Calls 4

BeginMethod · 0.45
EndMethod · 0.45
DeadLineMethod · 0.45
WakeMethod · 0.45

Tested by 1

TestEventQueueMethod · 0.64