Files
swift-mirror/stdlib/public/Concurrency/PlatformExecutorLinux.swift
Alastair Houghton c0ccdffeb7 [Concurrency] Add underscore prefixes for not yet official API.
Custom main and global executors work hasn't passed Swift Evolution yet,
so we need to avoid leaking it as API until it does.

To that end, underscore all the things.

rdar://151147606
2025-05-14 11:57:06 +01:00

26 lines
913 B
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 - 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#if !$Embedded && (os(Linux) || os(Android))
import Swift
// The default executors for now are Dispatch-based
@available(SwiftStdlib 6.2, *)
public struct _PlatformExecutorFactory: _ExecutorFactory {
public static let mainExecutor: any _MainExecutor = _DispatchMainExecutor()
public static let defaultExecutor: any TaskExecutor
= _DispatchGlobalTaskExecutor()
}
#endif // os(Linux)