]>
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 "librbd/AsioEngine.h"
7 #include "librbd/ImageCtx.h"
8 #include "librbd/asio/ContextWQ.h"
14 Threads
<I
>::Threads(std::shared_ptr
<librados::Rados
>& rados
) {
15 auto cct
= static_cast<CephContext
*>(rados
->cct());
16 asio_engine
= new librbd::AsioEngine(rados
);
17 work_queue
= asio_engine
->get_work_queue();
19 timer
= new SafeTimer(cct
, timer_lock
, true);
24 Threads
<I
>::~Threads() {
26 std::lock_guard timer_locker
{timer_lock
};
38 template class rbd::mirror::Threads
<librbd::ImageCtx
>;