Skip to content

Commit 6d77717

Browse files
Merge branch 'iss-27' into develop
2 parents 1cdf452 + d76a5ff commit 6d77717

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

include/pthread/pthread_exception.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace pthread {
2727
* @param message error message
2828
* @param pthread_errno a pthread function return code.
2929
*/
30-
pthread_exception( const string message, const int pthread_errno = 0 ): _message(message), _pthread_errno(pthread_number){};
30+
pthread_exception( const string message, const int pthread_errno = 0 ): _message(message), _pthread_errno(pthread_errno){};
3131

3232
virtual ~pthread_exception(){};
3333

include/pthread/thread.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ namespace pthread {
285285
*/
286286
void join();
287287

288+
unsigned long size();
289+
288290
/** return if thread_group should wait for all referenced abstract_thread terminate
289291
*/
290292
const bool destructor_joins_first(){ return _destructor_joins_first;};

src/thread.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ namespace pthread {
147147
}
148148
}
149149

150+
unsigned long thread_group::size(){
151+
return _threads.size();
152+
}
153+
150154
/**
151155
This function is a helper function. It has normal C linkage, and is
152156
the base for newly created Thread objects. It runs the

0 commit comments

Comments
 (0)