Skip to content

Commit

Permalink
Minor updates (#70)
Browse files Browse the repository at this point in the history
* chore: add brace to for loop

* build: update CPM.cmake version
  • Loading branch information
DeveloperPaul123 authored Aug 15, 2024
1 parent 9b0557d commit f14f97d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/CPM.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(CPM_DOWNLOAD_VERSION 0.38.1)
set(CPM_DOWNLOAD_VERSION 0.40.2)

if(CPM_SOURCE_CACHE)
# Expand relative path. This is important if the provided path contains a tilde (~)
Expand Down
4 changes: 3 additions & 1 deletion include/thread_pool/thread_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ namespace dp {
*/
size_t clear_tasks() {
size_t removed_task_count{0};
for (auto &task_list : tasks_) removed_task_count += task_list.tasks.clear();
for (auto &task_list : tasks_) {
removed_task_count += task_list.tasks.clear();
}
in_flight_tasks_.fetch_sub(removed_task_count, std::memory_order_release);
unassigned_tasks_.fetch_sub(removed_task_count, std::memory_order_release);

Expand Down

0 comments on commit f14f97d

Please sign in to comment.