| 127 | } |
| 128 | |
| 129 | ThreadToken* 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 | |
| 149 | int64_t LogQueue::query_cnt() const SKR_NOEXCEPT |
| 150 | { |
no test coverage detected