MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / wait

Method wait

modules/core/core/src/async/service_thread.cpp:53–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void ServiceThread::wait(uint64_t event, uint32_t fatal_timeout) SKR_NOEXCEPT
54{
55 auto now = skr_atomicu64_load_acquire(&event_);
56 if (now == event)
57 wait_timeout<u8"WaitLastEvent">([&]{ return get_action() == kActionNone; }, fatal_timeout);
58 else if (now > event)
59 return;
60 else if (now < event)
61 SKR_LOG_FATAL(u8"service_thread: can't wait an event that doesn't exist! current event: %llu, target event: %llu", now, event);
62}
63
64void ServiceThread::stop() SKR_NOEXCEPT
65{

Callers 1

sleepMethod · 0.45

Calls 1

Tested by

no test coverage detected