mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation With the introduction of isolated conformances, it has become necessary to start managing the use of metatypes for some of our protocols. In general, we don't want to force the relevant protocols to only be conformed in non-isolated forms. Instead, we just want to make the specific APIs non-usable. Modifications - Add shims for SendableMetatype that only use it when it is available. - Require SendableMetatype where needed, gated by @preconcurrency. Result We continue to be safe.
20 lines
647 B
Swift
20 lines
647 B
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftNIO open source project
|
|
//
|
|
// Copyright (c) 2025 Apple Inc. and the SwiftNIO project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#if compiler(>=6.2)
|
|
public typealias _NIOFileSystemSendableMetatype = SendableMetatype
|
|
#else
|
|
public typealias _NIOFileSystemSendableMetatype = Any
|
|
#endif
|