From 88fdaf5f079372fa61d142c4d3de502fe7b9623c Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Mon, 11 Jan 2021 15:45:35 -0500 Subject: [PATCH] rgw: Make some thread entry-points noexcept As mentioned above. Signed-off-by: Adam C. Emerson --- src/rgw/rgw_amqp.cc | 2 +- src/rgw/rgw_datalog.cc | 2 +- src/rgw/rgw_datalog.h | 2 +- src/rgw/rgw_kafka.cc | 2 +- src/rgw/rgw_period_pusher.cc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rgw/rgw_amqp.cc b/src/rgw/rgw_amqp.cc index 78446e88f68..205482b78ef 100644 --- a/src/rgw/rgw_amqp.cc +++ b/src/rgw/rgw_amqp.cc @@ -628,7 +628,7 @@ private: // (3) manages deleted connections // (4) TODO reconnect on connection errors // (5) TODO cleanup timedout callbacks - void run() { + void run() noexcept { amqp_frame_t frame; while (!stopped) { diff --git a/src/rgw/rgw_datalog.cc b/src/rgw/rgw_datalog.cc index b1c377704f4..54b501c82cb 100644 --- a/src/rgw/rgw_datalog.cc +++ b/src/rgw/rgw_datalog.cc @@ -860,7 +860,7 @@ RGWDataChangesLog::~RGWDataChangesLog() { } } -void RGWDataChangesLog::renew_run() { +void RGWDataChangesLog::renew_run() noexcept { for (;;) { dout(2) << "RGWDataChangesLog::ChangesRenewThread: start" << dendl; int r = renew_entries(); diff --git a/src/rgw/rgw_datalog.h b/src/rgw/rgw_datalog.h index 5440b3d1e4b..1e8652409ed 100644 --- a/src/rgw/rgw_datalog.h +++ b/src/rgw/rgw_datalog.h @@ -201,7 +201,7 @@ class RGWDataChangesLog { ceph::mutex renew_lock = ceph::make_mutex("ChangesRenewThread::lock"); ceph::condition_variable renew_cond; - void renew_run(); + void renew_run() noexcept; void renew_stop(); std::thread renew_thread; diff --git a/src/rgw/rgw_kafka.cc b/src/rgw/rgw_kafka.cc index 1e8af36ba87..55960971144 100644 --- a/src/rgw/rgw_kafka.cc +++ b/src/rgw/rgw_kafka.cc @@ -396,7 +396,7 @@ private: // (3) manages deleted connections // (4) TODO reconnect on connection errors // (5) TODO cleanup timedout callbacks - void run() { + void run() noexcept { while (!stopped) { // publish all messages in the queue diff --git a/src/rgw/rgw_period_pusher.cc b/src/rgw/rgw_period_pusher.cc index 0eb394ed9c7..66511bbcaed 100644 --- a/src/rgw/rgw_period_pusher.cc +++ b/src/rgw/rgw_period_pusher.cc @@ -145,7 +145,7 @@ class RGWPeriodPusher::CRThread { { http.start(); // must spawn the CR thread after start - thread = std::thread([this] { coroutines.run(push_all.get()); }); + thread = std::thread([this]() noexcept { coroutines.run(push_all.get()); }); } ~CRThread() { -- 2.47.3