Skip to content

[docs] Minor docs fixes for Task #74246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions stdlib/public/Concurrency/Task.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ import Swift
/// var result: Work?
///
/// deinit {
/// assert(work != nil)
/// // even though the task is still retained,
/// // once it completes it no longer causes a reference cycle with the actor
///
Expand All @@ -124,7 +123,7 @@ import Swift
/// And using it like this:
///
/// ```
/// await Actor().start()
/// await Worker().start()
/// ```
///
/// Note that the actor is only retained by the start() method's use of `self`,
Expand All @@ -135,7 +134,7 @@ import Swift
///
/// Therefore, the above call will consistently result in the following output:
///
/// ```
/// ```other
/// start task work
/// completed task work
/// deinit actor
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/Concurrency/TaskGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
/// to wait for all the child tasks to complete,
/// collecting the values they returned:
///
/// while let first = try await group.next() {
/// while let value = try await group.next() {
/// collected += value
/// }
/// return collected
Expand Down