motivation: address api feedback, do not clash module and type names
changes:
* remove top level Lifecycle psuedo namespace (enum)
* rename Lifecycle.Task to LifecyclTask
* rename Lifecycle.Handler to LifecycleHandler
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: Semaphores are not locks, if they are released too often by accident, we
will get into deep trouble because there's no longer mutual exclusion.
changes: use posix mutex
motivation: more swifty API, along the lines of DispatchQueue, Logger, Metrics
changes:
* rename LifecycleItem::name to LifecycleItem:label
* adjust tests
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