Merge pull request #124 from paullouisageneau/fix-threadpool-destruction

Fix ThreadPool static destruction issues
This commit is contained in:
Paul-Louis Ageneau
2020-07-15 21:38:42 +02:00
committed by GitHub

View File

@ -21,8 +21,9 @@
namespace rtc {
ThreadPool &ThreadPool::Instance() {
static ThreadPool instance;
return instance;
// Init handles joining on cleanup
static ThreadPool *instance = new ThreadPool;
return *instance;
}
ThreadPool::~ThreadPool() { join(); }