From 24c246a9f6f96a4b5de901e503e4ff189be435c0 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 15 Dec 2020 20:01:26 +0300 Subject: [PATCH] Fix potential thread_pool crash on exit Minor issue. --- rpcs3/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index 68bead6a83..51cb8f9686 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -39,6 +39,7 @@ DYNAMIC_IMPORT("ntdll.dll", NtSetTimerResolution, NTSTATUS(ULONG DesiredResoluti #include "Utilities/sysinfo.h" #include "Utilities/Config.h" +#include "Utilities/Thread.h" #include "rpcs3_version.h" #include "Emu/System.h" #include @@ -367,6 +368,9 @@ int main(int argc, char** argv) } #endif + // Initialize thread pool finalizer (on first use) + named_thread("", []{}); + std::unique_ptr log_file; { // Check free space