From b00d435ab60e431001aa4114d015933861fe8baf Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 5 Oct 2023 03:21:30 +0200 Subject: [PATCH] Library/Application: attempt to switch OutputDirector ...hitting a roadblock however: The existing Threads in the Lumiera application were effectively "detached" But the C++14 framework requires us to keep the Thread-object alive --- src/steam/play/output-director.cpp | 13 ++++---- wiki/thinkPad.ichthyo.mm | 52 +++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/src/steam/play/output-director.cpp b/src/steam/play/output-director.cpp index d5c310015..f7683a874 100644 --- a/src/steam/play/output-director.cpp +++ b/src/steam/play/output-director.cpp @@ -29,9 +29,9 @@ #include "steam/play/play-service.hpp" #include "steam/play/output-manager.hpp" #include "steam/play/output-director.hpp" -#include "vault/thread-wrapper.hpp" +#include "lib/thread.hpp" -using vault::Thread; +using lib::Thread; namespace steam { @@ -102,10 +102,11 @@ namespace play { if (not shutdown_initiated_) { shutdown_initiated_ = true; - Thread ("Output shutdown supervisor", - [=]{ - bringDown (completedSignal); - }); + Thread{"Output shutdown supervisor" + ,[=]{ + bringDown (completedSignal); + }} + .detach(); } } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index e8ed76cb2..ed8c1116b 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -80019,6 +80019,50 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + +

+ ...diese erzwingen, daß das Thread-Objekt während der gesamten Ausführung der Thread-Funktion erhalten bleibt; dies Design erscheint auch sinnvoll +

+ + +
+
+ + + + + + +

+ der bisherige Lumiera-Threadwrapper hat zwar ein Thread-Handle gehalten, das aber letztlich beim Threadpool registriert war. Daher war das Thread-Objekt selber im Grunde verzichtbar (es sei denn, man hat davon abgeleitet und dort weitere Felder untergebracht) +

+ + +
+
+ + + +
+ + + + + + + + + @@ -81112,7 +81156,13 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + + + + + + +