event/Thread: add "noexcept"

This commit is contained in:
Max Kellermann 2018-01-29 23:11:15 +01:00
parent 3fd9a86f3c
commit 19af364400
2 changed files with 6 additions and 6 deletions

View File

@ -30,7 +30,7 @@ EventThread::Start()
} }
void void
EventThread::Stop() EventThread::Stop() noexcept
{ {
if (thread.IsDefined()) { if (thread.IsDefined()) {
event_loop.Break(); event_loop.Break();
@ -39,7 +39,7 @@ EventThread::Stop()
} }
void void
EventThread::Run() EventThread::Run() noexcept
{ {
SetThreadName("io"); SetThreadName("io");

View File

@ -36,20 +36,20 @@ public:
EventThread() EventThread()
:event_loop(ThreadId::Null()), thread(BIND_THIS_METHOD(Run)) {} :event_loop(ThreadId::Null()), thread(BIND_THIS_METHOD(Run)) {}
~EventThread() { ~EventThread() noexcept {
Stop(); Stop();
} }
EventLoop &GetEventLoop() { EventLoop &GetEventLoop() noexcept {
return event_loop; return event_loop;
} }
void Start(); void Start();
void Stop(); void Stop() noexcept;
private: private:
void Run(); void Run() noexcept;
}; };
#endif /* MAIN_NOTIFY_H */ #endif /* MAIN_NOTIFY_H */