I've considered maintaining an internal list of InternalClientRunners and calling join_client_thread() on all of them immediately *after* executing any client provided stop callbacks.
That would simplify the main() functions (miral-kiosk needs nothing, miral-shell just needs the hook to close the decorations provider).
It would also be possible to introduce a mechanism to notify internal clients of a close request by supplying overloads that provide a callback for this purpose.
But all that is providing convenience for simple usecases when the mechanisms provided here are needed to address the general case.
I've considered maintaining an internal list of InternalClientR unners and calling join_client_ thread( ) on all of them immediately *after* executing any client provided stop callbacks.
That would simplify the main() functions (miral-kiosk needs nothing, miral-shell just needs the hook to close the decorations provider).
It would also be possible to introduce a mechanism to notify internal clients of a close request by supplying overloads that provide a callback for this purpose.
But all that is providing convenience for simple usecases when the mechanisms provided here are needed to address the general case.