Prevent UI thread deadlocking on Dispose()'ing rcheevos stuff
This commit is contained in:
parent
b9a983f1fe
commit
8ef1d93891
|
@ -179,6 +179,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
return shouldRemove;
|
||||
});
|
||||
}
|
||||
|
||||
// typically I'd rather do this Dispose()
|
||||
// but the Wait() semantics mean we can't do that on the UI thread
|
||||
foreach (var request in _activeHttpRequests)
|
||||
{
|
||||
if (request is ImageRequest) continue; // THIS IS BAD, I KNOW (but don't want the user to wait for useless ImageRequests to finish)
|
||||
request.Dispose(); // implicitly waits for the request to finish or timeout
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task<byte[]> HttpGet(string url)
|
||||
|
|
|
@ -226,13 +226,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
_isActive = false;
|
||||
_httpThread.Join();
|
||||
|
||||
// the http thread is dead, so we can safely use _activeHttpRequests
|
||||
foreach (var request in _activeHttpRequests)
|
||||
{
|
||||
if (request is ImageRequest) continue; // THIS IS BAD, I KNOW
|
||||
request.Dispose(); // implicitly waits for the request to finish or timeout
|
||||
}
|
||||
|
||||
_lib.rc_runtime_destroy(ref _runtime);
|
||||
Stop();
|
||||
_gameInfoForm.Dispose();
|
||||
|
|
Loading…
Reference in New Issue