mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
always @preconcurrency import Glibc/Musl/Android/Bionic/WASILibc (#3153)
### Motivation: The non-`Darwin` libcs don't have the correct concurrency annotations. But due to these Swift bugs, it's important that the _first_ importer uses `@preconcurrency`: - https://github.com/swiftlang/swift/issues/79414 - https://github.com/swiftlang/swift/issues/77866 ### Modifications: Much like the Foundation (& corelibs) PRs such as https://github.com/swiftlang/swift-foundation/pull/1175 , use `@preconcurrency import` for the non-`Darwin` libcs. ### Result: Fewer bad warnings/errors in user code.
This commit is contained in:
1 parent
6b00972ad9
commit
40ee44c6b9
30 files changed
+102
-102
No files matched your search
@@ -20,11 +20,11 @@ import SystemPackage
|
||||
#if canImport(Darwin)
|
||||
import Darwin
|
||||
#elseif canImport(Glibc)
|
||||
import Glibc
|
||||
@preconcurrency import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
@preconcurrency import Musl
|
||||
#elseif canImport(Bionic)
|
||||
import Bionic
|
||||
@preconcurrency import Bionic
|
||||
#endif
|
||||
|
||||
/// A file system which interacts with the local system. The file system uses a thread pool to
|
||||
|
||||
Reference in new issue
Block a user