Attempt to fix startup

This commit is contained in:
Christoph Hagen 2023-02-16 19:01:10 +01:00
parent 4253ae2589
commit 1927a35d37

View File

@ -5,7 +5,11 @@ var env = try Environment.detect()
try LoggingSystem.bootstrap(from: &env) try LoggingSystem.bootstrap(from: &env)
let app = Application(env) let app = Application(env)
defer { app.shutdown() } defer { app.shutdown() }
private let semaphore = DispatchSemaphore(value: 1)
Task { Task {
try await configure(app) try await configure(app)
try app.run() semaphore.signal()
} }
semaphore.wait()
try app.run()