Skip to content

Commit bba1f7c

Browse files
committed
Thread pool wait is now const
1 parent 52e382b commit bba1f7c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cpr/threadpool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void ThreadPool::Stop() {
7878
}
7979
}
8080

81-
void ThreadPool::Wait() {
81+
void ThreadPool::Wait() const {
8282
while (true) {
8383
if ((state != State::RUNNING && curThreadCount <= 0) || (tasks.empty() && curThreadCount <= idleThreadCount)) {
8484
break;

include/cpr/threadpool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class ThreadPool {
169169
/**
170170
* Returns as soon as the task queue is empty and all threads are either stopped/joined or in idel state.
171171
**/
172-
void Wait();
172+
void Wait() const;
173173

174174
/**
175175
* Enqueues a new task to the thread pool.

0 commit comments

Comments
 (0)