mirror of
https://github.com/swift-server/swift-service-lifecycle
synced 2026-11-27 05:04:26 +00:00
motivation: address shutdown for tasks which allocate resources on construction. before this change, only tasks that have been started are shutdown, this creates an issue when the resources are allocated on construction since the item may not get started at all (for example due to error in earlier task) and thus will never be shutdown and the resources will leak. changes: add sematics to request shutdown even if not started, and assume this sematics when registering with start: .none or with registerShutdown