Skip to content

Commit b7ccdca

Browse files
authored
Merge pull request #74247 from ktoso/pick-wip-docs
[6.0][docs] Minor docs fixes for Task
2 parents d9fefc8 + e06cc65 commit b7ccdca

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ import Swift
101101
/// var result: Work?
102102
///
103103
/// deinit {
104-
/// assert(work != nil)
105104
/// // even though the task is still retained,
106105
/// // once it completes it no longer causes a reference cycle with the actor
107106
///
@@ -124,7 +123,7 @@ import Swift
124123
/// And using it like this:
125124
///
126125
/// ```
127-
/// await Actor().start()
126+
/// await Worker().start()
128127
/// ```
129128
///
130129
/// Note that the actor is only retained by the start() method's use of `self`,
@@ -135,7 +134,7 @@ import Swift
135134
///
136135
/// Therefore, the above call will consistently result in the following output:
137136
///
138-
/// ```
137+
/// ```other
139138
/// start task work
140139
/// completed task work
141140
/// deinit actor

stdlib/public/Concurrency/TaskGroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
545545
/// to wait for all the child tasks to complete,
546546
/// collecting the values they returned:
547547
///
548-
/// while let first = try await group.next() {
548+
/// while let value = try await group.next() {
549549
/// collected += value
550550
/// }
551551
/// return collected

0 commit comments

Comments
 (0)