From 6382846f6c2d284d3bc9fb0f8b80f9408eb64b5e Mon Sep 17 00:00:00 2001 From: Michael Glassford Date: Thu, 17 Mar 2005 01:46:11 +0000 Subject: [PATCH] Add thread_group::size() method. [SVN r27716] --- include/boost/thread/thread.hpp | 1 + src/thread.cpp | 5 +++++ 2 files changed, 6 insertions(+) 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