mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 15:15:28 +00:00
Merge pull request #124 from paullouisageneau/fix-threadpool-destruction
Fix ThreadPool static destruction issues
This commit is contained in:
@ -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(); }
|
||||
|
Reference in New Issue
Block a user