]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/services/svc_finisher.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
4 #include "common/Finisher.h"
6 #include "svc_finisher.h"
10 int RGWSI_Finisher::do_start(optional_yield
, const DoutPrefixProvider
*dpp
)
12 finisher
= new Finisher(cct
);
18 void RGWSI_Finisher::shutdown()
27 map
<int, ShutdownCB
*> cbs
;
28 cbs
.swap(shutdown_cbs
); /* move cbs out, in case caller unregisetrs */
29 for (auto& iter
: cbs
) {
38 RGWSI_Finisher::~RGWSI_Finisher()
43 void RGWSI_Finisher::register_caller(ShutdownCB
*cb
, int *phandle
)
45 *phandle
= ++handles_counter
;
46 shutdown_cbs
[*phandle
] = cb
;
49 void RGWSI_Finisher::unregister_caller(int handle
)
51 shutdown_cbs
.erase(handle
);
54 void RGWSI_Finisher::schedule_context(Context
*c
)