From 9135eab27e068030baee7a4f7fcf4f6fba823819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 28 Apr 2026 13:03:40 +0200 Subject: [PATCH] update comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- opencloud/pkg/runtime/service/service.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/opencloud/pkg/runtime/service/service.go b/opencloud/pkg/runtime/service/service.go index a8885ea9e7..13b0af8076 100644 --- a/opencloud/pkg/runtime/service/service.go +++ b/opencloud/pkg/runtime/service/service.go @@ -428,11 +428,8 @@ func Start(ctx context.Context, o ...Option) error { // prepare the set of services to run s.generateRunSet(s.cfg) - // There are reasons not to do this, but we have race conditions ourselves. Until we resolve them, mind the following disclaimer: - // Calling ServeBackground will CORRECTLY start the supervisor running in a new goroutine. It is risky to directly run - // go supervisor.Serve() - // because that will briefly create a race condition as it starts up, if you try to .Add() services immediately afterward. - // https://pkg.go.dev/github.com/thejerf/suture/v4@v4.0.0#Supervisor + // We need to control the order in which services are started and shut down, + // so we need a backgroud context that will outlive the service execution. go s.Supervisor.ServeBackground(context.Background()) for i, service := range s.Services {