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

Method fetch

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

Source from the content-addressed store, hash-verified

10using VFSReaderFutureLauncher = skr::FutureLauncher<bool>;
11
12bool VFSRAMReader::fetch(SkrAsyncServicePriority priority, IORequestId request) SKR_NOEXCEPT
13{
14 auto pStatus = io_component<IOStatusComponent>(request.get());
15 const auto loaded = (pStatus->getStatus() == SKR_IO_STAGE_LOADED);
16 const auto cancelled = (pStatus->getStatus() == SKR_IO_STAGE_CANCELLED);
17 if (loaded || cancelled) // already processed by other readers
18 {
19 loaded_requests[priority].enqueue(request);
20 inc_processed(priority);
21 }
22 else if (auto pComp = io_component<IOStatusComponent>(request.get()))
23 {
24 SKR_ASSERT(pComp->getStatus() == SKR_IO_STAGE_RESOLVING);
25 fetched_requests[priority].enqueue(request);
26 inc_processing(priority);
27 }
28 return true;
29}
30
31uint64_t VFSRAMReader::get_prefer_batch_size() const SKR_NOEXCEPT
32{

Callers 1

enqueueBatchMethod · 0.45

Calls 3

getStatusMethod · 0.80
getMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected