event/Thread: use inline initializers
This commit is contained in:
parent
7df041310c
commit
b2bf95009b
@ -11,16 +11,15 @@
|
|||||||
* A thread which runs an #EventLoop.
|
* A thread which runs an #EventLoop.
|
||||||
*/
|
*/
|
||||||
class EventThread final {
|
class EventThread final {
|
||||||
EventLoop event_loop;
|
EventLoop event_loop{ThreadId::Null()};
|
||||||
|
|
||||||
Thread thread;
|
Thread thread{BIND_THIS_METHOD(Run)};
|
||||||
|
|
||||||
const bool realtime;
|
const bool realtime;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit EventThread(bool _realtime=false)
|
explicit EventThread(bool _realtime=false)
|
||||||
:event_loop(ThreadId::Null()), thread(BIND_THIS_METHOD(Run)),
|
:realtime(_realtime) {}
|
||||||
realtime(_realtime) {}
|
|
||||||
|
|
||||||
~EventThread() noexcept {
|
~EventThread() noexcept {
|
||||||
Stop();
|
Stop();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user