Let group hosts shut down on their own if unused

We would never try to shut the group host down if nothing ever tried to
connect to it. This could happen when the native host gets killed after
initializing the yabridge plugin but before it gets the chance to
request the group host process to host a plugin.
This commit is contained in:
Robbert van der Helm
2021-05-01 18:38:18 +02:00
parent a91c1a3733
commit 4ff538c7e1
3 changed files with 40 additions and 19 deletions
+7
View File
@@ -187,6 +187,13 @@ class GroupBridge {
*/
void async_handle_events();
/**
* After `delay` seconds, check if this group host process is (still)
* hosting any plugins. If not, then we'll terminate the process. When this
* function gets called multiple times later calls will reset the timer.
*/
void maybe_schedule_shutdown(std::chrono::steady_clock::duration delay);
/**
* The logging facility used for this group host process. Since we can't
* identify which plugin is generating (debug) output, every line will only