LifecycleShutdownHandler
public struct LifecycleShutdownHandler<State>
LifecycleHandler for shutting down stateful tasks. The state comes from a LifecycleStartHandler
-
Initialize a
LifecycleShutdownHandlerbased on a completion handler.Declaration
Swift
public init(_ handler: @escaping (State, @escaping (Error?) -> Void) -> Void)Parameters
handlerthe underlying completion handler
-
Asynchronous
LifecycleShutdownHandlerbased on a completion handler.Declaration
Swift
public static func async(_ handler: @escaping (State, @escaping (Error?) -> Void) -> Void) -> LifecycleShutdownHandlerParameters
handlerthe underlying async handler
-
Asynchronous
LifecycleShutdownHandlerbased on a blocking, throwing function.Declaration
Swift
public static func sync(_ body: @escaping (State) throws -> Void) -> LifecycleShutdownHandlerParameters
bodythe underlying function
View on GitHub
Install in Dash
LifecycleShutdownHandler Structure Reference