mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
Merge pull request #38852 from adamemerson/wip-thou-shalt-not-unwind
Thou Shalt Not Unwind
This commit is contained in:
commit
46dee40a29
@ -70,7 +70,7 @@ Thread::~Thread()
|
||||
{
|
||||
}
|
||||
|
||||
void *Thread::_entry_func(void *arg) {
|
||||
void *Thread::_entry_func(void *arg) noexcept {
|
||||
void *r = ((Thread*)arg)->entry_wrapper();
|
||||
return r;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class Thread {
|
||||
virtual void *entry() = 0;
|
||||
|
||||
private:
|
||||
static void *_entry_func(void *arg);
|
||||
static void *_entry_func(void *arg) noexcept;
|
||||
|
||||
public:
|
||||
const pthread_t &get_thread_id() const;
|
||||
|
@ -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) {
|
||||
|
||||
|
@ -953,11 +953,12 @@ int AsioFrontend::run()
|
||||
work.emplace(boost::asio::make_work_guard(context));
|
||||
|
||||
for (int i = 0; i < thread_count; i++) {
|
||||
threads.emplace_back([=] {
|
||||
threads.emplace_back([=]() noexcept {
|
||||
// request warnings on synchronous librados calls in this thread
|
||||
is_asio_thread = true;
|
||||
boost::system::error_code ec;
|
||||
context.run(ec);
|
||||
// Have uncaught exceptions kill the process and give a
|
||||
// stacktrace, not be swallowed.
|
||||
context.run();
|
||||
});
|
||||
}
|
||||
return 0;
|
||||
|
@ -864,7 +864,7 @@ RGWDataChangesLog::~RGWDataChangesLog() {
|
||||
}
|
||||
}
|
||||
|
||||
void RGWDataChangesLog::renew_run() {
|
||||
void RGWDataChangesLog::renew_run() noexcept {
|
||||
for (;;) {
|
||||
dout(2) << "RGWDataChangesLog::ChangesRenewThread: start" << dendl;
|
||||
int r = renew_entries();
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -483,7 +483,7 @@ public:
|
||||
// start the worker threads to do the actual queue processing
|
||||
const std::string WORKER_THREAD_NAME = "notif-worker";
|
||||
for (auto worker_id = 0U; worker_id < worker_count; ++worker_id) {
|
||||
workers.emplace_back([this]() { io_context.run(); });
|
||||
workers.emplace_back([this]() noexcept { io_context.run(); });
|
||||
const auto rc = ceph_pthread_setname(workers.back().native_handle(),
|
||||
(WORKER_THREAD_NAME+std::to_string(worker_id)).c_str());
|
||||
ceph_assert(rc == 0);
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user