]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: wake up wait coroutine thread on destruction
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 2 Sep 2015 15:36:29 +0000 (08:36 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:12:39 +0000 (16:12 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_sync.cc

index 3d36d979f4136103c405c518606d117b91f3fa0f..563db25b8e14d40fbea28463f31fe10bda20eb0e 100644 (file)
@@ -765,6 +765,11 @@ public:
   RGWAsyncWait(RGWAioCompletionNotifier *cn, CephContext *_cct, Mutex *_lock, Cond *_cond, int _secs) : RGWAsyncRadosRequest(cn),
                                        cct(_cct),
                                        lock(_lock), cond(_cond), interval(_secs, 0) {}
+
+  void wakeup() {
+    Mutex::Locker l(*lock);
+    cond->Signal();
+  }
 };
 
 class RGWWaitCR : public RGWSimpleCoroutine {
@@ -784,6 +789,7 @@ public:
   }
 
   ~RGWWaitCR() {
+    wakeup();
     delete req;
   }
 
@@ -796,6 +802,10 @@ public:
   int request_complete() {
     return req->get_ret_status();
   }
+
+  void wakeup() {
+    req->wakeup();
+  }
 };
 
 class RGWAsyncReadMDLogEntries : public RGWAsyncRadosRequest {