diff --git a/Sources/NIOCore/EventLoop+SerialExecutor.swift b/Sources/NIOCore/EventLoop+SerialExecutor.swift index 6453452bde..865ce769cd 100644 --- a/Sources/NIOCore/EventLoop+SerialExecutor.swift +++ b/Sources/NIOCore/EventLoop+SerialExecutor.swift @@ -86,10 +86,10 @@ extension NIODefaultEventLoopExecutor: SerialExecutor { /// /// Implementers of `EventLoop` should consider conforming to this protocol as /// well on Swift 6.0 and later. -@available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) +@available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) public protocol NIOTaskEventLoopExecutor: NIOSerialEventLoopExecutor & TaskExecutor { } -@available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) +@available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) extension NIOTaskEventLoopExecutor { @inlinable func asUnownedTaskExecutor() -> UnownedTaskExecutor { @@ -102,7 +102,7 @@ extension NIOTaskEventLoopExecutor { } } -@available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) +@available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) extension NIODefaultEventLoopExecutor: TaskExecutor { @inlinable public func asUnownedTaskExecutor() -> UnownedTaskExecutor { diff --git a/Sources/NIOCore/EventLoop.swift b/Sources/NIOCore/EventLoop.swift index 45dfa8ff52..62ad3cf071 100644 --- a/Sources/NIOCore/EventLoop.swift +++ b/Sources/NIOCore/EventLoop.swift @@ -400,7 +400,7 @@ extension EventLoop { #endif #if compiler(>=6.0) - @available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) + @available(macOS 15.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) public var taskExecutor: any TaskExecutor { NIODefaultEventLoopExecutor(self) } diff --git a/Sources/NIOEmbedded/AsyncTestingEventLoop.swift b/Sources/NIOEmbedded/AsyncTestingEventLoop.swift index 58f20b6bd0..8bca6bbfa6 100644 --- a/Sources/NIOEmbedded/AsyncTestingEventLoop.swift +++ b/Sources/NIOEmbedded/AsyncTestingEventLoop.swift @@ -357,7 +357,7 @@ extension NIOAsyncTestingEventLoop: NIOSerialEventLoopExecutor { } // MARK: TaskExecutor conformance #if compiler(>=6.0) -@available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) +@available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) extension NIOAsyncTestingEventLoop: NIOTaskEventLoopExecutor { } #endif diff --git a/Sources/NIOEmbedded/Embedded.swift b/Sources/NIOEmbedded/Embedded.swift index 9e2eb23cdf..fee4d60d43 100644 --- a/Sources/NIOEmbedded/Embedded.swift +++ b/Sources/NIOEmbedded/Embedded.swift @@ -242,7 +242,7 @@ public final class EmbeddedEventLoop: EventLoop { #endif #if compiler(>=6.0) - @available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) + @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) public var taskExecutor: any TaskExecutor { fatalError("EmbeddedEventLoop is not thread safe and cannot be used as a TaskExecutor. Use NIOAsyncTestingEventLoop instead.") } diff --git a/Sources/NIOPosix/SelectableEventLoop.swift b/Sources/NIOPosix/SelectableEventLoop.swift index da32500213..2da4e2a816 100644 --- a/Sources/NIOPosix/SelectableEventLoop.swift +++ b/Sources/NIOPosix/SelectableEventLoop.swift @@ -886,6 +886,6 @@ internal func assertExpression(_ body: () -> Bool) { // MARK: TaskExecutor conformance #if compiler(>=6.0) -@available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) +@available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) extension SelectableEventLoop: NIOTaskEventLoopExecutor { } #endif diff --git a/Tests/NIOPosixTests/TaskExecutorTests.swift b/Tests/NIOPosixTests/TaskExecutorTests.swift index bd8cf4bc84..a245ef4c5f 100644 --- a/Tests/NIOPosixTests/TaskExecutorTests.swift +++ b/Tests/NIOPosixTests/TaskExecutorTests.swift @@ -19,7 +19,7 @@ import XCTest final class TaskExecutorTests: XCTestCase { #if compiler(>=6.0) - @available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) + @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) func _runTests(loop1: some EventLoop, loop2: some EventLoop) async { await withTaskGroup(of: Void.self) { taskGroup in taskGroup.addTask(executorPreference: loop1.taskExecutor) { @@ -57,7 +57,7 @@ final class TaskExecutorTests: XCTestCase { } #endif - @available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) + @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) func testSelectableEventLoopAsTaskExecutor() async throws { #if compiler(>=6.0) let group = MultiThreadedEventLoopGroup(numberOfThreads: 2) @@ -72,7 +72,7 @@ final class TaskExecutorTests: XCTestCase { #endif } - @available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *) + @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *) func testAsyncTestingEventLoopAsTaskExecutor() async throws { #if compiler(>=6.0) let loop1 = NIOAsyncTestingEventLoop()