callers don't need to call it explicitly
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
}
}
virtual ~RGWCoroutinesManager() {
+ stop();
completion_mgr->put();
if (cr_registry) {
cr_registry->remove(this);
int run(list<RGWCoroutinesStack *>& ops);
int run(RGWCoroutine *op);
void stop() {
- going_down.set(1);
- completion_mgr->go_down();
+ if (going_down.inc() == 1) {
+ completion_mgr->go_down();
+ }
}
virtual void report_error(RGWCoroutinesStack *op);