diff options
Diffstat (limited to 'cpp/src/qpid/concurrent')
-rw-r--r-- | cpp/src/qpid/concurrent/APRThread.cpp | 6 | ||||
-rw-r--r-- | cpp/src/qpid/concurrent/APRThread.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/concurrent/APRThread.cpp b/cpp/src/qpid/concurrent/APRThread.cpp index f1bfa6c7da..d4d073cac6 100644 --- a/cpp/src/qpid/concurrent/APRThread.cpp +++ b/cpp/src/qpid/concurrent/APRThread.cpp @@ -27,7 +27,7 @@ void* APR_THREAD_FUNC ExecRunnable(apr_thread_t* thread, void *data){ return NULL; } -APRThread::APRThread(apr_pool_t* _pool, Runnable* _runnable) : runnable(_runnable), pool(_pool) {} +APRThread::APRThread(apr_pool_t* _pool, Runnable* _runnable) : runnable(_runnable), pool(_pool), runner(0) {} APRThread::~APRThread(){ } @@ -38,11 +38,11 @@ void APRThread::start(){ void APRThread::join(){ apr_status_t status; - CHECK_APR_SUCCESS(apr_thread_join(&status, runner)); + if (runner) CHECK_APR_SUCCESS(apr_thread_join(&status, runner)); } void APRThread::interrupt(){ - CHECK_APR_SUCCESS(apr_thread_exit(runner, APR_SUCCESS)); + if (runner) CHECK_APR_SUCCESS(apr_thread_exit(runner, APR_SUCCESS)); } unsigned int qpid::concurrent::APRThread::currentThread(){ diff --git a/cpp/src/qpid/concurrent/APRThread.h b/cpp/src/qpid/concurrent/APRThread.h index 6d3fc0a285..6328765a06 100644 --- a/cpp/src/qpid/concurrent/APRThread.h +++ b/cpp/src/qpid/concurrent/APRThread.h @@ -26,7 +26,7 @@ namespace qpid { namespace concurrent { - class APRThread : public virtual Thread + class APRThread : public Thread { const Runnable* runnable; apr_pool_t* pool; |