mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-23 15:48:03 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
38db6d7365 | |||
781d864b9f | |||
8cbcb35bf4 |
@ -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