Commit Graph
10 Commits
Author SHA1 Message Date
tomer doron faa9f17905 expose the underlying lifecycle for composition reasons (#70)
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)
2021-03-13 11:20:42 -08:00
Fabian Fettandtomer doron c0c22246a3 Remove unused macOS(.v10_12) platform requirement (#71)
Co-authored-by: tomer doron <tomerd@apple.com>
2020-09-01 10:28:59 -07:00
tomer doron d18349b069 update package name to swift-service-lifecycle (#39)
* update package name to swift-service-lifecycle

motivation: better name

changes: update package name and readme
2020-05-27 19:04:32 -07:00
tomer doron a22bf0b3be refactor towards 1.0 (#34)
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
2020-04-09 21:15:22 -07:00
Johannes Weiss 541cf1bb7c correctness: shutdown while hanging start (#19)
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
2020-04-05 11:48:03 -07:00
tomer doron 070734a734 rename module (#12)
motivation: adjust module name to avoid ambiguity between module and main type

changes: rename Lifecycle to ServiceLauncher
2020-03-31 20:08:32 -07:00
Yim Lee ca931c083d Make LifecyleNIOCompat a product (#6)
Motivation:
Have other project(s) that want to take advantage of LifecyleNIOCompat.

Modifications:
Add LifecycleNIOCompat to products.

Result:
Other projects can depend on LifecycleNIOCompat.
2020-03-23 21:02:54 -07:00
tomer doron 46a98e2852 refactor "append" api (#3)
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
2020-03-23 11:35:55 -07:00
Yim Lee eea02db2a7 Fix package name typo
Motivation:
Typo in package name.

Modifications:
Fix package name.

Result:
Correct package name.
2020-03-18 13:45:26 -07:00
Tom Doron 1abe527c92 initial commit 2020-03-18 11:56:30 -07:00