Closed
Description
consider this code
service.register(label: "thing",
start: .sync {
print("THIS WILL FAIL")
struct SomeError: Error {}
throw SomeError()
},
shutdown: .sync {
print("SHUTDOWN <<< SHOULD NEVER HAPPEN")
},
shutdownIfNotStarted: false)
try service.startAndWait()
clearly, it should never invoke the shutdown
handler because the start
one failed but it still will. It prints:
THIS WILL FAIL
SHUTDOWN <<< SHOULD NEVER HAPPEN