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

Method mark_flushing

modules/core/core/src/core/log/log_worker.cpp:92–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void LogQueue::mark_flushing(SThreadID tid) SKR_NOEXCEPT
93{
94 if (auto tok = query_token(tid))
95 {
96 if (tok->query_cnt() != 0) // if there is no log in this thread, we don't need to flush
97 skr_atomic32_cas_relaxed(&tok->flush_status_, kNoFlush, kFlushing);
98 else
99 skr_atomic32_cas_relaxed(&tok->flush_status_, kNoFlush, kFlushed);
100 }
101}
102
103bool LogQueue::try_dequeue(LogElement& element) SKR_NOEXCEPT
104{

Callers 1

flushMethod · 0.80

Calls 2

skr_atomic32_cas_relaxedFunction · 0.85
query_cntMethod · 0.80

Tested by

no test coverage detected