MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / OnIOJobExecuted

Method OnIOJobExecuted

CrySystem/RefStreamEngine.cpp:486–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484}
485
486void CRefStreamEngine::OnIOJobExecuted (CRefReadStreamProxy* pJobProxy)
487{
488 if (m_hIOWorker && (pJobProxy->GetParams().nFlags & SRP_FLAGS_ASYNC_CALLBACK))
489 pJobProxy->FinalizeIO();
490
491 {
492 AUTO_LOCK(m_csIOPending);
493 {
494 AUTO_LOCK(m_csIOExecuted);
495 // first add, then erase - to avoid releasing the autopointer
496 // this is under double-locked CS's to avoid in-between artifacts
497 m_queIOExecuted.push_back(pJobProxy);
498 m_setIOPending.erase (pJobProxy);
499 }
500 }
501
502 SetEvent (m_hIOExecuted);
503
504 // perhaps this will free the way for another IO job.
505 // but we won't call StartIOJobs(), because this same funciton can only be
506 // called as part of Waiting after which the caller is aware that some jobs may have been executed
507}
508
509#ifndef LINUX
510// returns the (cached) size of the sector on the volume where the given path points

Callers 1

OnIOExecutedMethod · 0.80

Calls 4

FinalizeIOMethod · 0.80
GetParamsMethod · 0.45
push_backMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected