Kill the message handler thread when killing the debugger

This commit is contained in:
svc64 2023-12-13 19:34:44 +02:00
parent 6b74bcec7c
commit bca3939a65
2 changed files with 11 additions and 1 deletions

View File

@ -167,6 +167,9 @@ namespace Ryujinx.HLE.Debugger
DebugProcess.DebugStop(); DebugProcess.DebugStop();
Reply($"T05thread:{ctx.ThreadUid:x};"); Reply($"T05thread:{ctx.ThreadUid:x};");
break; break;
case KillMessage:
return;
} }
} }
} }
@ -732,8 +735,9 @@ namespace Ryujinx.HLE.Debugger
ReadStream?.Close(); ReadStream?.Close();
WriteStream?.Close(); WriteStream?.Close();
DebuggerThread.Join(); DebuggerThread.Join();
Messages.Dispose(); Messages.Add(new KillMessage());
MessageHandlerThread.Join(); MessageHandlerThread.Join();
Messages.Dispose();
} }
} }

View File

@ -0,0 +1,6 @@
namespace Ryujinx.HLE.Debugger
{
struct KillMessage : IMessage
{
}
}