Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ public static void CleanupTestAssets()
{
if (s_isSessionMutexOwner)
{
try { s_sessionMutex.ReleaseMutex(); } catch (ApplicationException) { }
// AssemblyCleanup may run on a different thread than AssemblyInitialize.
// On macOS/Linux the runtime throws InvalidOperationException for
// cross-thread release; on Windows it throws ApplicationException.
try { s_sessionMutex.ReleaseMutex(); } catch (Exception ex) when (ex is ApplicationException or InvalidOperationException) { }
Comment thread
nohwnd marked this conversation as resolved.
}
s_sessionMutex.Dispose();
s_sessionMutex = null;
Expand Down