You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
/// Designed for composition purposes, mainly for frameworks that need to offer both top-level start/stop functionality and composition into larger systems.
107
110
/// In other words, should not be used outside the context of building an Application framework.
108
-
privateletunderlying:ComponentLifecycle
111
+
publicletunderlying:ComponentLifecycle
109
112
110
113
/// Creates a `ServiceLifecycle` instance.
111
114
///
@@ -114,11 +117,8 @@ public struct ServiceLifecycle {
// setup backtraces as soon as possible, so if we crash during setup we get a backtrace
121
+
self.installBacktrace()
122
122
}
123
123
124
124
/// Starts the provided `LifecycleTask` array.
@@ -127,13 +127,19 @@ public struct ServiceLifecycle {
127
127
/// - parameters:
128
128
/// - callback: The handler which is called after the start operation completes. The parameter will be `nil` on success and contain the `Error` otherwise.
0 commit comments