mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Just in case, also clear results on shutdown.
This commit is contained in:
parent
0ca769721a
commit
10f52fa2b0
3 changed files with 8 additions and 0 deletions
|
@ -503,6 +503,7 @@ void __IoShutdown() {
|
|||
if (ioManagerThread != NULL) {
|
||||
delete ioManagerThread;
|
||||
ioManagerThread = NULL;
|
||||
ioManager.Shutdown();
|
||||
}
|
||||
|
||||
pspFileSystem.Unmount("ms0:", memstickSystem);
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue