mirror of
https://github.com/swift-server/swift-service-lifecycle
synced 2026-11-26 04:57:53 +00:00
Update availability checks for async function for all supported platforms (#118)
This commit is contained in:
1 parent
da0cb159aa
commit
2bc97b030e
1 file changed
+6
-6
@@ -95,8 +95,8 @@ public struct LifecycleHandler {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.5) && canImport(_Concurrency)
|
||||
@available(macOS 12.0, *)
|
||||
#if canImport(_Concurrency) && compiler(>=5.5.2)
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
extension LifecycleHandler {
|
||||
public init(_ handler: @escaping () async throws -> Void) {
|
||||
self = LifecycleHandler { callback in
|
||||
@@ -159,8 +159,8 @@ public struct LifecycleStartHandler<State> {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.5) && canImport(_Concurrency)
|
||||
@available(macOS 12.0, *)
|
||||
#if canImport(_Concurrency) && compiler(>=5.5.2)
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
extension LifecycleStartHandler {
|
||||
public init(_ handler: @escaping () async throws -> State) {
|
||||
self = LifecycleStartHandler { callback in
|
||||
@@ -221,8 +221,8 @@ public struct LifecycleShutdownHandler<State> {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.5) && canImport(_Concurrency)
|
||||
@available(macOS 12.0, *)
|
||||
#if canImport(_Concurrency) && compiler(>=5.5.2)
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
extension LifecycleShutdownHandler {
|
||||
public init(_ handler: @escaping (State) async throws -> Void) {
|
||||
self = LifecycleShutdownHandler { state, callback in
|
||||
|
||||
Reference in new issue
Block a user