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

Function DoIoSleep

library/cpp/coroutine/engine/coroutine_ut.cpp:627–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

625 };
626
627 static void DoIoSleep(TCont* cont, void* argPtr) noexcept {
628 try {
629 TState& state = *(TState*) (argPtr);
630 state.IoSleepRunning = true;
631
632 TTempBuf tmp;
633 // Wait for the event from io
634 auto res = NCoro::ReadD(cont, state.In.GetHandle(), tmp.Data(), 1, TDuration::Seconds(10).ToDeadLine());
635 UNIT_ASSERT_VALUES_EQUAL(res.Checked(), 0);
636 state.IoSleepRunning = false;
637 } catch (const NUnitTest::TAssertException& ex) {
638 Cerr << ex.AsStrBuf() << Endl;
639 ex.BackTrace()->PrintTo(Cerr);
640 throw;
641 } catch (...) {
642 Cerr << CurrentExceptionMessage() << Endl;
643 throw;
644 }
645 }
646
647 static void DoSub(TCont* cont, void* argPtr) noexcept {
648 TSubState& state = *(TSubState*)(argPtr);

Callers

nothing calls this directly

Calls 10

ReadDFunction · 0.85
CurrentExceptionMessageFunction · 0.85
ToDeadLineMethod · 0.80
CheckedMethod · 0.80
AsStrBufMethod · 0.80
SecondsFunction · 0.50
GetHandleMethod · 0.45
DataMethod · 0.45
PrintToMethod · 0.45
BackTraceMethod · 0.45

Tested by

no test coverage detected