File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -677,6 +677,7 @@ void BasicPrivatizedThreadpool<Func>::wait_for_all() {
677677
678678/* A different implementation
679679
680+
680681template < template<typename...> class Func >
681682class BasicPrivatizedThreadpool {
682683
@@ -1036,13 +1037,12 @@ void BasicPrivatizedThreadpool<Func>::silent_async(C&& c){
10361037 if(!_workers[id]->queue.push_back(t)){
10371038 std::scoped_lock<std::mutex> lock(_mutex);
10381039 _task_queue.push_back(std::move(t));
1039- _workers[id]->cv.notify_one();
10401040 }
10411041 else{
10421042 // Lock to make sure the worker will be notified
10431043 std::scoped_lock<std::mutex> lock(_mutex);
1044- _workers[id]->cv.notify_one();
10451044 }
1045+ _workers[id]->cv.notify_one();
10461046}
10471047
10481048
@@ -1073,6 +1073,7 @@ void BasicPrivatizedThreadpool<Func>::wait_for_all() {
10731073 _empty_cv.wait(lock);
10741074 }
10751075}
1076+
10761077*/
10771078
10781079
You can’t perform that action at this time.
0 commit comments