diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-10-18 10:36:01 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-10-18 10:36:01 -0700 |
commit | 0e08af41b8103fa37ca723fda5563335a02adf08 (patch) | |
tree | 561df58c4e751da7bdbd0ac4c527e0e63e7be8c1 | |
parent | 09bd6bbe3b5e66a281da762d34ec71f27f038ac6 (diff) | |
download | ceph-wip-3896.tar.gz |
rest-bench: drain work queue before exitingwip-3896
Fixes: #3896
We assert if workqueue is not empty on shutdown. This makes it so that
if there are still running threads, we're going to wait on them. Which
means that if there's an error in handling requests, we might wait
forever.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/tools/rest_bench.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/rest_bench.cc b/src/tools/rest_bench.cc index feea4de4932..b6bdd2b5e18 100644 --- a/src/tools/rest_bench.cc +++ b/src/tools/rest_bench.cc @@ -282,6 +282,9 @@ public: list_bucket_handler.listBucketCallback = list_bucket_callback; } + ~RESTDispatcher() { + req_wq.stop(); + } void process_context(req_context *ctx); void get_obj(req_context *ctx); void put_obj(req_context *ctx); |