File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -475,10 +475,11 @@ extension FileDescriptor.OpenOptions
475
475
}
476
476
477
477
#if compiler(>=5.5) && canImport(_Concurrency)
478
- // The decision on whether to make FileDescriptor Sendable or not
479
- // is currently being discussed in https://github.com/apple/swift-system/pull/112
480
- //@available(*, unavailable, message: "File descriptors are not completely thread-safe.")
481
- //extension FileDescriptor: Sendable {}
478
+ // File descriptors aren't necessarily safe to use across threads.
479
+ // However, since they can be used in a safe way,
480
+ // we do make them `Sendable` to not make it unnecessarily complicated to
481
+ // use them across concurrency boundaries in a safe way.
482
+ extension FileDescriptor : Sendable { }
482
483
483
484
extension FileDescriptor . AccessMode : Sendable { }
484
485
extension FileDescriptor . OpenOptions : Sendable { }
You can’t perform that action at this time.
0 commit comments