motivation: application frameworks thae use ServiceLifecycle may need to expose their underlying lifecycle so they can be also composed into larger systems
changes:
* expose ServiceLifecycle::underlying
* make sure backtrace installer is only called once per process
* add swift-atomics dependency (>=5.2 and above)
* add atomic helper (<5.2)
motivation: finalize naming and API towards 1.0
changes:
* rename package to swift-service-boostrap
* rename modules to Lifecycle and LifecycleNIOCompat
* create top level namespace named Lifecycle
* rename LifecycleItem to LifecycleTask, with Lifecycle.Task typealias
* define top-level type called ServiceLifecycle where signal handling and backtraces are handled
* rename Lifecycle to ComponentLifecycle and conform it to Lifecycle.Task so that lifecycles can be nested
* change shutdown to return an error to better conform with Lifecycle.Task api
* improve logging
* improve API docs
* adjust tests
motivation: fix correctness issue when shutting down while hanging start use case
changes:
* only shutdown started items when shutting down while starting
* refactor shutdown to use the configured callback queue from start, instead of a separate one
* add correctness tests
Motivation:
Have other project(s) that want to take advantage of LifecyleNIOCompat.
Modifications:
Add LifecycleNIOCompat to products.
Result:
Other projects can depend on LifecycleNIOCompat.
motivation: simplify registering items based on closures
changes:
* rename append to register
* introduce a Handler object that is an enum of sorts for types of startup and shutdown handler signature we support
* refactor tests to use the new code