Just in case, also clear results on shutdown.

This commit is contained in:
Unknown W. Brackets 2014-01-26 19:10:20 -08:00
parent 0ca769721a
commit 10f52fa2b0
3 changed files with 8 additions and 0 deletions

View file

@ -503,6 +503,7 @@ void __IoShutdown() {
if (ioManagerThread != NULL) {
delete ioManagerThread;
ioManagerThread = NULL;
ioManager.Shutdown();
}
pspFileSystem.Unmount("ms0:", memstickSystem);

View file

@ -29,6 +29,12 @@ void AsyncIOManager::ScheduleOperation(AsyncIOEvent ev) {
ScheduleEvent(ev);
}
void AsyncIOManager::Shutdown() {
lock_guard guard(resultsLock_);
resultsPending_.clear();
results_.clear();
}
bool AsyncIOManager::PopResult(u32 handle, AsyncIOResult &result) {
lock_guard guard(resultsLock_);
if (results_.find(handle) != results_.end()) {

View file

@ -52,6 +52,7 @@ public:
void DoState(PointerWrap &p);
void ScheduleOperation(AsyncIOEvent ev);
void Shutdown();
bool PopResult(u32 handle, AsyncIOResult &result);
bool WaitResult(u32 handle, AsyncIOResult &result);