| 294 | } |
| 295 | |
| 296 | void DStorageRAMReader::pollSubmitted(SkrAsyncServicePriority priority) SKR_NOEXCEPT |
| 297 | { |
| 298 | SkrZoneScopedN("DStorage::PollSubmitted"); |
| 299 | |
| 300 | auto instance = skr_get_dstorage_instnace(); |
| 301 | for (auto& e : submitted[priority]) |
| 302 | { |
| 303 | if (e->okay() || e->batches.empty()) |
| 304 | { |
| 305 | for (auto batch : e->batches) |
| 306 | { |
| 307 | for (auto request : batch->get_requests()) |
| 308 | { |
| 309 | auto pFile = io_component<FileComponent>(request.get()); |
| 310 | auto pStatus = io_component<IOStatusComponent>(request.get()); |
| 311 | pStatus->setStatus(SKR_IO_STAGE_LOADED); |
| 312 | skr_dstorage_close_file(instance, pFile->dfile); |
| 313 | pFile->dfile = nullptr; |
| 314 | } |
| 315 | processed_batches[priority].enqueue(batch); |
| 316 | dec_processing(priority); |
| 317 | inc_processed(priority); |
| 318 | } |
| 319 | e.reset(); |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | // remove empty events |
| 324 | auto cleaner = std::remove_if(submitted[priority].begin(), submitted[priority].end(), [](const auto& e) { return !e; }); |
| 325 | submitted[priority].erase(cleaner, submitted[priority].end()); |
| 326 | } |
| 327 | |
| 328 | void DStorageRAMReader::dispatch(SkrAsyncServicePriority priority) SKR_NOEXCEPT |
| 329 | { |
nothing calls this directly
no test coverage detected