aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/includes/hicn/transport/utils/thread_pool.h
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/includes/hicn/transport/utils/thread_pool.h')
-rw-r--r--libtransport/includes/hicn/transport/utils/thread_pool.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libtransport/includes/hicn/transport/utils/thread_pool.h b/libtransport/includes/hicn/transport/utils/thread_pool.h
index e4e47209c..76218ff09 100644
--- a/libtransport/includes/hicn/transport/utils/thread_pool.h
+++ b/libtransport/includes/hicn/transport/utils/thread_pool.h
@@ -29,8 +29,11 @@ class ThreadPool : public NonCopyable {
std::size_t n_threads = std::thread::hardware_concurrency())
: workers_(n_threads > 0 ? n_threads : 1) {}
+ ~ThreadPool() = default;
+
std::size_t getNThreads() const { return workers_.size(); }
EventThread &getWorker(std::size_t i) { return workers_.at(i); }
+ std::vector<EventThread> &getWorkers() { return workers_; }
private:
std::vector<EventThread> workers_;