You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: stdlib/public/Concurrency/Task.swift
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -127,9 +127,11 @@ import Swift
127
127
/// await Actor().start()
128
128
/// ```
129
129
///
130
-
/// Note that there is nothing, other than the Task's use of `self` retaining the actor,
131
-
/// And that the start method immediately returns, without waiting for the unstructured `Task` to finish.
132
-
/// So once the task is completed and its closure is destroyed, the strong reference to the "self" of the actor is also released allowing the actor to deinitialize as expected.
130
+
/// Note that the actor is only retained by the start() method's use of `self`,
131
+
/// and that the start method immediately returns, without waiting for the
132
+
/// unstructured `Task` to finish. Once the task is completed and its closure is
133
+
/// destroyed, the strong reference to the actor is also released allowing the
134
+
/// actor to deinitialize as expected.
133
135
///
134
136
/// Therefore, the above call will consistently result in the following output:
0 commit comments