From 822724d1aae303291d8f769213c1f9a080b7ed83 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 10 Feb 2017 22:12:44 +0100 Subject: [PATCH] event/Thread: auto-stop in the destructor --- src/event/Thread.hxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/event/Thread.hxx b/src/event/Thread.hxx index f65ef9261..3484bd44e 100644 --- a/src/event/Thread.hxx +++ b/src/event/Thread.hxx @@ -36,6 +36,10 @@ class EventThread final { Thread thread; public: + ~EventThread() { + Stop(); + } + EventLoop &GetEventLoop() { return event_loop; }