event/Thread: add "noexcept"
This commit is contained in:
parent
3fd9a86f3c
commit
19af364400
@ -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");
|
||||||
|
|
||||||
|
@ -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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user