diff --git a/include/boost/thread/thread.hpp b/include/boost/thread/thread.hpp index 91714d3e..5666bb5c 100644 --- a/include/boost/thread/thread.hpp +++ b/include/boost/thread/thread.hpp @@ -70,6 +70,7 @@ public: void add_thread(thread* thrd); void remove_thread(thread* thrd); void join_all(); + int size(); private: std::list m_threads; diff --git a/src/thread.cpp b/src/thread.cpp index 2575e184..c3df8d6b 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -367,4 +367,9 @@ void thread_group::join_all() } } +int thread_group::size() +{ + return m_threads.size(); +} + } // namespace boost