Unlock reslts before scheduling.

To prevent deadlock while debugging with events all running sync.
This commit is contained in:
Unknown W. Brackets 2014-04-28 22:32:09 -07:00
parent effcee475b
commit f052778c2d

View file

@ -32,9 +32,11 @@ bool AsyncIOManager::HasOperation(u32 handle) {
}
void AsyncIOManager::ScheduleOperation(AsyncIOEvent ev) {
lock_guard guard(resultsLock_);
if (!resultsPending_.insert(ev.handle).second) {
ERROR_LOG_REPORT(SCEIO, "Scheduling operation for file %d while one is pending (type %d)", ev.handle, ev.type);
{
lock_guard guard(resultsLock_);
if (!resultsPending_.insert(ev.handle).second) {
ERROR_LOG_REPORT(SCEIO, "Scheduling operation for file %d while one is pending (type %d)", ev.handle, ev.type);
}
}
ScheduleEvent(ev);
}