File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,10 @@ import Swift
83
83
/// Once this code has ran to completion, and the task therefore has completed, resulting in either
84
84
/// a failure or result value, this closure is eagerly released.
85
85
///
86
- /// Keeping the `Task` object retained, will not indefinitely keep the closure retained.
87
- /// This means that tasks rarely need to capture values as `weak`, since when they complete
88
- /// any references they hold are released (as the closure is released).
86
+ /// Retaining a task object doesn't indefinitely retain the closure,
87
+ /// because any references that a task holds are released
88
+ /// after the task completes.
89
+ /// Consequently, tasks rarely need to capture weak references to values.
89
90
///
90
91
/// For example, in this example, it is not necessary to capture the actor as weak,
91
92
/// because as the task completes it'll let go of the actor reference, breaking the
You can’t perform that action at this time.
0 commit comments