mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-12 11:58:28 -05:00
hle: kernel: Remove service thread manager and use weak_ptr.
- We no longer need to queue up service threads to be destroyed. - Fixes a race condition where a thread could be destroyed too early, which caused a crash in Pokemon Sword/Shield.
This commit is contained in:
@ -85,8 +85,8 @@ public:
|
||||
*/
|
||||
void ClientDisconnected(KServerSession* session);
|
||||
|
||||
std::shared_ptr<ServiceThread> GetServiceThread() const {
|
||||
return service_thread.lock();
|
||||
std::weak_ptr<ServiceThread> GetServiceThread() const {
|
||||
return service_thread;
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -152,7 +152,7 @@ public:
|
||||
session_handler = std::move(handler);
|
||||
}
|
||||
|
||||
std::shared_ptr<ServiceThread> GetServiceThread() const {
|
||||
std::weak_ptr<ServiceThread> GetServiceThread() const {
|
||||
return session_handler->GetServiceThread();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user