mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 15:15:28 +00:00
Merge branch 'v0.11'
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
project(libdatachannel
|
||||
VERSION 0.11.9
|
||||
VERSION 0.11.10
|
||||
LANGUAGES CXX)
|
||||
set(PROJECT_DESCRIPTION "WebRTC Data Channels Library")
|
||||
|
||||
|
@ -67,7 +67,7 @@ void ThreadPool::join() {
|
||||
|
||||
void ThreadPool::run() {
|
||||
++mBusyWorkers;
|
||||
scope_guard([&]() { --mBusyWorkers; });
|
||||
scope_guard guard([&]() { --mBusyWorkers; });
|
||||
while (runOne()) {
|
||||
}
|
||||
}
|
||||
@ -94,7 +94,7 @@ std::function<void()> ThreadPool::dequeue() {
|
||||
}
|
||||
|
||||
--mBusyWorkers;
|
||||
scope_guard([&]() { ++mBusyWorkers; });
|
||||
scope_guard guard([&]() { ++mBusyWorkers; });
|
||||
mWaitingCondition.notify_all();
|
||||
if(time)
|
||||
mTasksCondition.wait_until(lock, *time);
|
||||
|
@ -72,7 +72,7 @@ protected:
|
||||
std::function<void()> dequeue(); // returns null function if joining
|
||||
|
||||
std::vector<std::thread> mWorkers;
|
||||
int mBusyWorkers = 0;
|
||||
std::atomic<int> mBusyWorkers = 0;
|
||||
std::atomic<bool> mJoining = false;
|
||||
|
||||
struct Task {
|
||||
|
Reference in New Issue
Block a user