From 1927a35d376f2066e7e12dc3bb9e854e8c3f4bfd Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Thu, 16 Feb 2023 19:01:10 +0100 Subject: [PATCH] Attempt to fix startup --- Sources/Run/main.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/Run/main.swift b/Sources/Run/main.swift index 8cfcf58..f37a67d 100644 --- a/Sources/Run/main.swift +++ b/Sources/Run/main.swift @@ -5,7 +5,11 @@ var env = try Environment.detect() try LoggingSystem.bootstrap(from: &env) let app = Application(env) defer { app.shutdown() } + +private let semaphore = DispatchSemaphore(value: 1) Task { try await configure(app) - try app.run() + semaphore.signal() } +semaphore.wait() +try app.run()