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

Method query_flushing

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

Source from the content-addressed store, hash-verified

127}
128
129ThreadToken* LogQueue::query_flushing() const SKR_NOEXCEPT
130{
131 skr_rw_mutex_acquire_r(&tids_mutex_);
132 tids_cpy_ = tids_;
133 skr_rw_mutex_release_r(&tids_mutex_);
134
135 for (uint64_t tid : tids_cpy_)
136 {
137 auto iter = thread_id_map_.find(tid);
138 if (iter != thread_id_map_.end())
139 {
140 if (skr_atomic32_load_relaxed(&iter->second->flush_status_) == kFlushing)
141 {
142 return iter->second.get();
143 }
144 }
145 }
146 return nullptr;
147}
148
149int64_t LogQueue::query_cnt() const SKR_NOEXCEPT
150{

Callers 1

process_logsMethod · 0.80

Calls 6

skr_rw_mutex_acquire_rFunction · 0.50
skr_rw_mutex_release_rFunction · 0.50
findMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected