diff options
author | Jason Dillaman <dillaman@redhat.com> | 2016-01-14 22:21:05 +0100 |
---|---|---|
committer | Jason Dillaman <dillaman@redhat.com> | 2016-01-14 22:21:05 +0100 |
commit | a290d34ebdfa571f62e69839ae0c3a9d11f075d1 (patch) | |
tree | 8f1697e919e7a707dae6c499a103dc76b347fd4d /src/common/WorkQueue.h | |
parent | Merge pull request #7222 from dack/master (diff) | |
parent | Merge pull request #7220 from dillaman/wip-13810-jewel (diff) | |
download | ceph-a290d34ebdfa571f62e69839ae0c3a9d11f075d1.tar.xz ceph-a290d34ebdfa571f62e69839ae0c3a9d11f075d1.zip |
Merge remote-tracking branch 'upstream/jewel'
Diffstat (limited to 'src/common/WorkQueue.h')
-rw-r--r-- | src/common/WorkQueue.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/WorkQueue.h b/src/common/WorkQueue.h index a9a753378b4..67c1a87b783 100644 --- a/src/common/WorkQueue.h +++ b/src/common/WorkQueue.h @@ -354,10 +354,6 @@ public: template<typename T> class PointerWQ : public WorkQueue_ { public: - PointerWQ(string n, time_t ti, time_t sti, ThreadPool* p) - : WorkQueue_(n, ti, sti), m_pool(p), m_processing(0) { - m_pool->add_work_queue(this); - } ~PointerWQ() { m_pool->remove_work_queue(this); assert(m_processing == 0); @@ -383,6 +379,9 @@ public: return _empty(); } protected: + PointerWQ(string n, time_t ti, time_t sti, ThreadPool* p) + : WorkQueue_(n, ti, sti), m_pool(p), m_processing(0) { + } virtual void _clear() { assert(m_pool->_lock.is_locked()); m_items.clear(); @@ -580,6 +579,7 @@ public: ContextWQ(const string &name, time_t ti, ThreadPool *tp) : ThreadPool::PointerWQ<Context>(name, ti, 0, tp), m_lock("ContextWQ::m_lock") { + tp->add_work_queue(this); } void queue(Context *ctx, int result = 0) { |