Skip to content

Commit 0857d0f

Browse files
committed
remove last mention of spawnDetached
1 parent a3738b4 commit 0857d0f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

include/swift/ABI/Task.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ class ContinuationAsyncContext : public AsyncContext {
566566
/// task.
567567
///
568568
/// This type matches the ABI of a function `<T> () async throws -> T`, which
569-
/// is the type used by `spawnDetached` and `Task.group.add` to create
569+
/// is the type used by `detach` and `Task.group.add` to create
570570
/// futures.
571571
class FutureAsyncContext : public AsyncContext {
572572
public:

stdlib/public/Concurrency/Task.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ extension Task {
393393
/// - Returns: handle to the task, allowing to `await handle.get()` on the
394394
/// tasks result or `cancel` it. If the operation fails the handle will
395395
/// throw the error the operation has thrown when awaited on.
396-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
397396
@discardableResult
397+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
398398
public func detach<T>(
399399
priority: Task.Priority = .unspecified,
400400
operation: __owned @Sendable @escaping () async -> T
@@ -447,6 +447,7 @@ public func detach<T>(
447447
/// tasks result or `cancel` it. If the operation fails the handle will
448448
/// throw the error the operation has thrown when awaited on.
449449
@discardableResult
450+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
450451
public func detach<T, Failure>(
451452
priority: Task.Priority = .unspecified,
452453
operation: __owned @Sendable @escaping () async throws -> T
@@ -468,8 +469,8 @@ public func detach<T, Failure>(
468469

469470
// ==== Async Handler ----------------------------------------------------------
470471

471-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
472472
// TODO: remove this?
473+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
473474
func _runAsyncHandler(operation: @escaping () async -> ()) {
474475
typealias ConcurrentFunctionType = @Sendable () async -> ()
475476
detach(

stdlib/public/Concurrency/TaskGroup.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public func withTaskGroup<ChildTaskResult: Sendable, GroupResult>(
142142
/// - once the `withTaskGroup` returns the group is guaranteed to be empty.
143143
/// - if the body throws:
144144
/// - all tasks remaining in the group will be automatically cancelled.
145+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
145146
public func withThrowingTaskGroup<ChildTaskResult: Sendable, GroupResult>(
146147
of childTaskResultType: ChildTaskResult.Type,
147148
returning returnType: GroupResult.Type = GroupResult.self,
@@ -189,6 +190,7 @@ public func withThrowingTaskGroup<ChildTaskResult: Sendable, GroupResult>(
189190
/// A task group serves as storage for dynamically spawned tasks.
190191
///
191192
/// It is created by the `withTaskGroup` function.
193+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
192194
public struct TaskGroup<ChildTaskResult: Sendable> {
193195

194196
private let _task: Builtin.NativeObject
@@ -427,6 +429,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
427429
/// child tasks.
428430
///
429431
/// It is created by the `withTaskGroup` function.
432+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
430433
public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
431434

432435
private let _task: Builtin.NativeObject
@@ -685,6 +688,7 @@ extension TaskGroup: AsyncSequence {
685688
/// after any task completes by throwing an error.
686689
///
687690
/// - SeeAlso: `TaskGroup.next()`
691+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
688692
public struct Iterator: AsyncIteratorProtocol {
689693
public typealias Element = ChildTaskResult
690694

@@ -738,6 +742,7 @@ extension ThrowingTaskGroup: AsyncSequence {
738742
/// throwing an error, no further task results are returned.
739743
///
740744
/// - SeeAlso: `ThrowingTaskGroup.next()`
745+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
741746
public struct Iterator: AsyncIteratorProtocol {
742747
public typealias Element = ChildTaskResult
743748

0 commit comments

Comments
 (0)