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

Method pollSubmitted

modules/engine/runtime/src/io/ram/ram_readers.cpp:296–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void 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
328void DStorageRAMReader::dispatch(SkrAsyncServicePriority priority) SKR_NOEXCEPT
329{

Callers

nothing calls this directly

Calls 11

remove_ifFunction · 0.85
skr_dstorage_close_fileFunction · 0.50
emptyMethod · 0.45
getMethod · 0.45
setStatusMethod · 0.45
enqueueMethod · 0.45
resetMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected