]>
git.proxmox.com Git - ceph.git/blob - ceph/src/tools/rbd_mirror/Threads.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #include "tools/rbd_mirror/Threads.h"
5 #include "common/Timer.h"
6 #include "common/WorkQueue.h"
7 #include "librbd/ImageCtx.h"
13 Threads
<I
>::Threads(CephContext
*cct
) : timer_lock("Threads::timer_lock") {
14 thread_pool
= new ThreadPool(cct
, "Journaler::thread_pool", "tp_journal",
15 cct
->_conf
->get_val
<int64_t>("rbd_op_threads"),
19 work_queue
= new ContextWQ("Journaler::work_queue",
20 cct
->_conf
->get_val
<int64_t>("rbd_op_thread_timeout"),
23 timer
= new SafeTimer(cct
, timer_lock
, true);
28 Threads
<I
>::~Threads() {
30 Mutex::Locker
timer_locker(timer_lock
);
45 template class rbd::mirror::Threads
<librbd::ImageCtx
>;