mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-09-03 23:59:31 +00:00
Made Processor keep an init token to prevent early threadpool join
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
#define RTC_PROCESSOR_H
|
||||
|
||||
#include "include.hpp"
|
||||
#include "init.hpp"
|
||||
#include "threadpool.hpp"
|
||||
|
||||
#include <condition_variable>
|
||||
@ -49,6 +50,9 @@ public:
|
||||
protected:
|
||||
void schedule();
|
||||
|
||||
// Keep an init token
|
||||
const init_token mInitToken = Init::Token();
|
||||
|
||||
std::queue<std::function<void()>> mTasks;
|
||||
bool mPending = false; // true iff a task is pending in the thread pool
|
||||
|
||||
|
Reference in New Issue
Block a user