Skip to content

Commit a9ec308

Browse files
authored
Dont use label for callbacks intended to be used as trailing (#30)
Resolves #26
1 parent d31c08e commit a9ec308

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/ServiceLauncher/Lifecycle.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ public class Lifecycle {
6868
/// - parameters:
6969
/// - configuration: Defines lifecycle `Configuration`
7070
/// - callback: The handler which is called after the start operation completes. The parameter will be `nil` on success and contain the `Error` otherwise.
71-
public func start(configuration: Configuration = .init(), callback: @escaping (Error?) -> Void) {
71+
public func start(configuration: Configuration = .init(), _ callback: @escaping (Error?) -> Void) {
7272
let items = self.itemsLock.withLock { self.items }
7373
self._start(configuration: configuration, items: items, callback: callback)
7474
}
7575

7676
/// Shuts down the `LifecycleItem` array provided in `start` or `startAndWait`.
7777
/// Shutdown is performed in reverse order of items provided.
78-
public func shutdown(callback: @escaping ([String: Error]?) -> Void = { _ in }) {
78+
public func shutdown(_ callback: @escaping ([String: Error]?) -> Void = { _ in }) {
7979
let setupShutdownListener = { (queue: DispatchQueue) in
8080
self.shutdownGroup.notify(queue: queue) {
8181
guard case .shutdown(let errors) = self.state else {

0 commit comments

Comments
 (0)