summaryrefslogtreecommitdiff
path: root/src/stable/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/thread.cpp')
-rw-r--r--src/stable/thread.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stable/thread.cpp b/src/stable/thread.cpp
index 0d0b768..9cf223e 100644
--- a/src/stable/thread.cpp
+++ b/src/stable/thread.cpp
@@ -9,6 +9,8 @@
9 9
10#include "bu/config.h" 10#include "bu/config.h"
11 11
12namespace Bu { subExceptionDef( ThreadException ); }
13
12Bu::ThreadId::ThreadId( pthread_t tId ) : 14Bu::ThreadId::ThreadId( pthread_t tId ) :
13 tId( tId ) 15 tId( tId )
14{ 16{
@@ -43,7 +45,10 @@ Bu::ThreadId Bu::Thread::currentThread()
43 45
44bool Bu::Thread::start() 46bool Bu::Thread::start()
45{ 47{
46 nHandle = pthread_create( &ptHandle, NULL, threadRunner, this ); 48 if( pthread_create( &ptHandle, NULL, threadRunner, this ) )
49 {
50 throw Bu::ThreadException("Could not start thread.");
51 }
47 52
48 return true; 53 return true;
49} 54}