diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-29 23:11:15 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-29 23:11:15 +0100 |
commit | 19af364400c390fedca7ea262e69ad216c4226c1 (patch) | |
tree | 23ae6e3b9f8eaf5883473d877bee675dbc2f8728 /src/event | |
parent | 3fd9a86f3c7f19a9b94a53f293e5c8b14e2d11a3 (diff) |
event/Thread: add "noexcept"
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/Thread.cxx | 4 | ||||
-rw-r--r-- | src/event/Thread.hxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/event/Thread.cxx b/src/event/Thread.cxx index 5b7f47adf..f7c2b9a0b 100644 --- a/src/event/Thread.cxx +++ b/src/event/Thread.cxx @@ -30,7 +30,7 @@ EventThread::Start() } void -EventThread::Stop() +EventThread::Stop() noexcept { if (thread.IsDefined()) { event_loop.Break(); @@ -39,7 +39,7 @@ EventThread::Stop() } void -EventThread::Run() +EventThread::Run() noexcept { SetThreadName("io"); diff --git a/src/event/Thread.hxx b/src/event/Thread.hxx index 00ed6307c..b9d2d72b5 100644 --- a/src/event/Thread.hxx +++ b/src/event/Thread.hxx @@ -36,20 +36,20 @@ public: EventThread() :event_loop(ThreadId::Null()), thread(BIND_THIS_METHOD(Run)) {} - ~EventThread() { + ~EventThread() noexcept { Stop(); } - EventLoop &GetEventLoop() { + EventLoop &GetEventLoop() noexcept { return event_loop; } void Start(); - void Stop(); + void Stop() noexcept; private: - void Run(); + void Run() noexcept; }; #endif /* MAIN_NOTIFY_H */ |