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

Method ~CRefStreamEngine

CrySystem/RefStreamEngine.cpp:61–88  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////// MT: Main thread only

Source from the content-addressed store, hash-verified

59//////////////////////////////////////////////////////////////////////////
60// MT: Main thread only
61CRefStreamEngine::~CRefStreamEngine()
62{
63 StopWorkerThread();
64
65 m_setLockedStreams.clear();
66
67 // fail all outstanding requests
68 // we don't need to lock, since there's already no worker thread at this moment
69 while (!m_queIOJobs.empty())
70 {
71 CRefReadStreamProxy_AutoPtr pJob = m_queIOJobs.front();
72 m_queIOJobs.pop_front();
73 pJob->OnFinishRead(ERROR_ABORTED_ON_SHUTDOWN); // aborted
74 }
75
76 // finalize all the jobs that can be finalized
77 while (!m_queIOExecuted.empty() && FinalizeIOJobs(FLAGS_DISABLE_CALLBACK_TIME_QUOTA) > 0)
78 continue;
79
80 // if we still have some streams, that's because someone didn't release the proxy
81 if (m_pLog)
82 for (NameStreamMap::iterator it = m_mapFilesByName.begin(); it != m_mapFilesByName.end(); ++it)
83 m_pLog->Log("%s: %s", it->first.c_str(), it->second->Dump().c_str());
84
85 CloseHandle (m_hIOJob);
86 CloseHandle (m_hIOExecuted);
87 CloseHandle (m_hDummyEvent);
88}
89
90unsigned CRefStreamEngine::UpdateAndWait (unsigned nMilliseconds, unsigned nFlags)
91{

Callers

nothing calls this directly

Calls 10

OnFinishReadMethod · 0.80
clearMethod · 0.45
emptyMethod · 0.45
frontMethod · 0.45
pop_frontMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
LogMethod · 0.45
c_strMethod · 0.45
DumpMethod · 0.45

Tested by

no test coverage detected