Skip to content

Commit 0f65ff4

Browse files
committed
chore: Mark some ThreadPool methods as noexcept
1 parent 617597c commit 0f65ff4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ccache/util/threadpool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ThreadPool::ThreadPool(size_t number_of_threads, size_t task_queue_max_size)
3131
}
3232
}
3333

34-
ThreadPool::~ThreadPool()
34+
ThreadPool::~ThreadPool() noexcept
3535
{
3636
shut_down();
3737
}
@@ -53,7 +53,7 @@ ThreadPool::enqueue(std::function<void()> function)
5353
}
5454

5555
void
56-
ThreadPool::shut_down()
56+
ThreadPool::shut_down() noexcept
5757
{
5858
{
5959
std::unique_lock<std::mutex> lock(m_mutex);

src/ccache/util/threadpool.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class ThreadPool
3535
explicit ThreadPool(
3636
size_t number_of_threads,
3737
size_t task_queue_max_size = std::numeric_limits<size_t>::max());
38-
~ThreadPool();
38+
~ThreadPool() noexcept;
3939

4040
void enqueue(std::function<void()> function);
41-
void shut_down();
41+
void shut_down() noexcept;
4242

4343
private:
4444
std::vector<std::thread> m_worker_threads;

0 commit comments

Comments
 (0)