Just in case, also clear results on shutdown.

This commit is contained in:
Unknown W. Brackets committed 2014-01-26 19:10:20 -08:00
1 parent 0ca769721a
commit 10f52fa2b0
3 files changed
+8

No files matched your search

+1
View File
@@ -503,6 +503,7 @@ void __IoShutdown() {
if (ioManagerThread != NULL) {
delete ioManagerThread;
ioManagerThread = NULL;
ioManager.Shutdown();
}
pspFileSystem.Unmount("ms0:", memstickSystem);
+6
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()) {
+1
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);