1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2025-01-03 18:16:00 +00:00
Ryujinx/src/Ryujinx.HLE/HOS
jhorv 21e88f17f6
ServerBase thread safety (#4577)
* Add guard against ServerBase.Dispose() being called multiple times. Add reset event to avoid Dispose() being called while the ServerLoop is still running.

* remove unused usings

* rework ServerBase to use one collection each for sessions and ports, and make all accesses thread-safe.

* fix Logger call

* use GetSessionObj(int) instead of using _sessions directly

* move _threadStopped check inside "dispose once" test

* - Replace _threadStopped event with attempt to Join() the ending thread (if that isn't the current thread) instead.

- Use the instance-local _selfProcess and (new) _selfThread variables to avoid suggesting that the current KProcess and KThread could change. Per gdkchan, they can't currently, and this old IPC system will be removed before that changes.

- Re-order Dispose() so that the Interlocked _isDisposed check is the last check before disposing, to increase the likelihood that multiple callers will result in one of them succeeding.

* code style suggestions per AcK77

* add infinite wait for thread termination
2023-05-21 21:28:51 +02:00
..
Applets Move solution and projects to src 2023-04-27 23:51:14 +02:00
Diagnostics/Demangler Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ipc Move solution and projects to src 2023-04-27 23:51:14 +02:00
Kernel Move solution and projects to src 2023-04-27 23:51:14 +02:00
Services ServerBase thread safety (#4577) 2023-05-21 21:28:51 +02:00
SystemState Move solution and projects to src 2023-04-27 23:51:14 +02:00
Tamper Move solution and projects to src 2023-04-27 23:51:14 +02:00
ArmProcessContext.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ArmProcessContextFactory.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
HomebrewRomFsStream.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Horizon.cs audio: sdl2: Do not report 5.1 if the device doesn't support it (#4908) 2023-05-13 07:15:16 +00:00
IdDictionary.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
LibHacHorizonManager.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ModLoader.cs ModLoader: Fix case sensitivy issues without breaking cheats (#4783) 2023-05-05 09:39:08 +02:00
ResultCode.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ServiceCtx.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
TamperMachine.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
UserChannelPersistence.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00