Skip to content

Commit 96e79f6

Browse files
committed
Update availability checks
1 parent 3a3e84d commit 96e79f6

File tree

3 files changed

+2
-34
lines changed

3 files changed

+2
-34
lines changed

Sources/NIOEmbedded/AsyncTestingEventLoop.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ extension NIOAsyncTestingEventLoop: NIOSerialEventLoopExecutor {}
512512

513513
// MARK: TaskExecutor conformance
514514
#if compiler(>=6.0)
515-
@available(macOS 9999.0, iOS 9999.0, watchOS 9999.0, tvOS 9999.0, *)
515+
@available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *)
516516
extension NIOAsyncTestingEventLoop: NIOTaskEventLoopExecutor { }
517517
#endif
518518

Sources/NIOPosix/SelectableEventLoop.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,5 @@ extension SelectableEventLoop {
10841084
// MARK: TaskExecutor conformance
10851085
#if compiler(>=6.0)
10861086
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
1087-
extension SelectableEventLoop: NIOTaskEventLoopExecutor {
1088-
1089-
}
1087+
extension SelectableEventLoop: NIOTaskEventLoopExecutor { }
10901088
#endif

Tests/NIOPosixTests/TaskExecutorTests.swift

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,6 @@ import XCTest
1818

1919
final class TaskExecutorTests: XCTestCase {
2020
#if compiler(>=6.0)
21-
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
22-
func testBasicExecutorFitsOnEventLoop_MTELG() async throws {
23-
let group = MultiThreadedEventLoopGroup(numberOfThreads: 2)
24-
let loops = Array(group.makeIterator())
25-
await withTaskGroup(of: Void.self) { taskGroup in
26-
let loop0Executor = loops[0].taskExecutor
27-
let loop1Executor = loops[1].taskExecutor
28-
taskGroup.addTask(executorPreference: loop0Executor) {
29-
loops[0].assertInEventLoop()
30-
loops[1].assertNotInEventLoop()
31-
32-
withUnsafeCurrentTask { task in
33-
// this currently fails on macOS
34-
XCTAssertEqual(task?.unownedTaskExecutor, loop0Executor.asUnownedTaskExecutor())
35-
}
36-
}
37-
38-
taskGroup.addTask(executorPreference: loop1Executor) {
39-
loops[0].assertNotInEventLoop()
40-
loops[1].assertInEventLoop()
41-
42-
withUnsafeCurrentTask { task in
43-
// this currently fails on macOS
44-
XCTAssertEqual(task?.unownedTaskExecutor, loop1Executor.asUnownedTaskExecutor())
45-
}
46-
}
47-
}
48-
try await group.shutdownGracefully()
49-
}
50-
5121
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
5222
func _runTests(loop1: some EventLoop, loop2: some EventLoop) async {
5323
let executor1 = loop1.taskExecutor

0 commit comments

Comments
 (0)