This commit is contained in:
riperiperi 2024-05-20 20:19:49 +01:00
parent 5f509a8261
commit 48f86a9935
3 changed files with 3 additions and 10 deletions

View file

@ -1,7 +1,6 @@
using Ryujinx.Common;
using Ryujinx.HLE.HOS.Kernel.Process;
using System;
using System.Diagnostics;
using System.Numerics;
using System.Threading;
@ -295,8 +294,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
return;
}
Debug.Assert(currentThread != null);
currentThread.SchedulerWaitEvent.Reset();
currentThread.ThreadContext.Unlock();

View file

@ -6,7 +6,6 @@ using Ryujinx.HLE.HOS.Kernel.SupervisorCall;
using Ryujinx.Horizon.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Numerics;
using System.Threading;

View file

@ -515,14 +515,11 @@ namespace Ryujinx.HLE.HOS.Services
{
if (disposing && _selfThread != null)
{
if (_selfThread.HostThread != null)
if (_selfThread.HostThread.ManagedThreadId != Environment.CurrentManagedThreadId && _selfThread.HostThread.Join(_threadJoinTimeout) == false)
{
if (_selfThread.HostThread.ManagedThreadId != Environment.CurrentManagedThreadId && _selfThread.HostThread.Join(_threadJoinTimeout) == false)
{
Logger.Warning?.Print(LogClass.Service, $"The ServerBase thread didn't terminate within {_threadJoinTimeout:g}, waiting longer.");
Logger.Warning?.Print(LogClass.Service, $"The ServerBase thread didn't terminate within {_threadJoinTimeout:g}, waiting longer.");
_selfThread.HostThread.Join(Timeout.Infinite);
}
_selfThread.HostThread.Join(Timeout.Infinite);
}
if (Interlocked.Exchange(ref _isDisposed, 1) == 0)