Skip to content

Commit 97db554

Browse files
committed
Remove Sendable conformance from FileDescriptor, add comment
1 parent f7938ab commit 97db554

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Sources/System/FileDescriptor.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,13 @@ extension FileDescriptor.OpenOptions
475475
}
476476

477477
#if compiler(>=5.5) && canImport(_Concurrency)
478-
@available(*, unavailable, message: "FileDescriptors aren't safe to use across multiple threads.")
479-
extension FileDescriptor: Sendable {}
478+
// File descriptors aren't necessarily safe to use across threads.
479+
// Thus no explicit `Sendable` conformance.
480+
// They can be used in a safe way, however,
481+
// which is why the conformance cannot be marked with `@available(*, unavailable)`.
482+
483+
// extension FileDescriptor: Sendable {}
484+
480485
extension FileDescriptor.AccessMode: Sendable {}
481486
extension FileDescriptor.OpenOptions: Sendable {}
482487
extension FileDescriptor.SeekOrigin: Sendable {}

0 commit comments

Comments
 (0)