diff options
Diffstat (limited to 'cpp/common/concurrent')
-rw-r--r-- | cpp/common/concurrent/inc/Runnable.h | 1 | ||||
-rw-r--r-- | cpp/common/concurrent/src/APRBase.cpp | 3 | ||||
-rw-r--r-- | cpp/common/concurrent/src/APRThread.cpp | 2 | ||||
-rw-r--r-- | cpp/common/concurrent/src/APRThreadPool.cpp | 6 | ||||
-rw-r--r-- | cpp/common/concurrent/src/Runnable.cpp | 19 |
5 files changed, 24 insertions, 7 deletions
diff --git a/cpp/common/concurrent/inc/Runnable.h b/cpp/common/concurrent/inc/Runnable.h index 523ad813f7..9753a1ad0a 100644 --- a/cpp/common/concurrent/inc/Runnable.h +++ b/cpp/common/concurrent/inc/Runnable.h @@ -24,6 +24,7 @@ namespace concurrent { class Runnable { public: + virtual ~Runnable(); virtual void run() = 0; }; diff --git a/cpp/common/concurrent/src/APRBase.cpp b/cpp/common/concurrent/src/APRBase.cpp index f87ea9e25f..f9b34b9333 100644 --- a/cpp/common/concurrent/src/APRBase.cpp +++ b/cpp/common/concurrent/src/APRBase.cpp @@ -91,7 +91,6 @@ void qpid::concurrent::check(apr_status_t status, const std::string& file, const std::string qpid::concurrent::get_desc(apr_status_t status){ const int size = 50; char tmp[size]; - std::string msg(apr_strerror(status, tmp, size)); - return msg; + return std::string(apr_strerror(status, tmp, size)); } diff --git a/cpp/common/concurrent/src/APRThread.cpp b/cpp/common/concurrent/src/APRThread.cpp index 4202fe81b6..4167fb76ff 100644 --- a/cpp/common/concurrent/src/APRThread.cpp +++ b/cpp/common/concurrent/src/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) : pool(_pool), runnable(_runnable){} +APRThread::APRThread(apr_pool_t* _pool, Runnable* _runnable) : runnable(_runnable), pool(_pool) {} APRThread::~APRThread(){ } diff --git a/cpp/common/concurrent/src/APRThreadPool.cpp b/cpp/common/concurrent/src/APRThreadPool.cpp index e0fcb804e6..8518d98b67 100644 --- a/cpp/common/concurrent/src/APRThreadPool.cpp +++ b/cpp/common/concurrent/src/APRThreadPool.cpp @@ -22,13 +22,11 @@ using namespace qpid::concurrent; -APRThreadPool::APRThreadPool(int _size) : size(_size), factory(new APRThreadFactory()), - deleteFactory(true), running(false){ +APRThreadPool::APRThreadPool(int _size) : deleteFactory(true), size(_size), factory(new APRThreadFactory()), running(false){ worker = new Worker(this); } -APRThreadPool::APRThreadPool(int _size, ThreadFactory* _factory) : size(_size), factory(_factory), - deleteFactory(false), running(false){ +APRThreadPool::APRThreadPool(int _size, ThreadFactory* _factory) : deleteFactory(false), size(_size), factory(_factory), running(false){ worker = new Worker(this); } diff --git a/cpp/common/concurrent/src/Runnable.cpp b/cpp/common/concurrent/src/Runnable.cpp new file mode 100644 index 0000000000..cf9b8d586f --- /dev/null +++ b/cpp/common/concurrent/src/Runnable.cpp @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "Runnable.h" +qpid::concurrent::Runnable::~Runnable() {} |