File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,31 @@ CHANGELOG
29
29
Swift 5.5
30
30
---------
31
31
32
+ * [ SE-0313] [ ] :
33
+
34
+ Parameters of actor type can be declared as ` isolated ` , which means that they
35
+ represent the actor on which that code will be executed. ` isolated ` parameters
36
+ extend the actor-isolated semantics of the ` self ` parameter of actor methods
37
+ to arbitrary parameters. For example:
38
+
39
+ ``` swift
40
+ actor MyActor {
41
+ func f () { }
42
+ }
43
+
44
+ func g (actor : isolated MyActor) {
45
+ actor.f () // okay, this code is always executing on "actor"
46
+ }
47
+
48
+ func h (actor : MyActor) async {
49
+ g (actor : actor) // error, call must be asynchronous
50
+ await g (actor : actor) // okay, hops to "actor" before calling g
51
+ }
52
+ ```
53
+
54
+ The ` self ` parameter of actor methods are implicitly ` isolated ` . The
55
+ ` nonisolated ` keyword makes the ` self ` parameter no longer ` isolated ` .
56
+
32
57
* [ SR-14731] [ ] :
33
58
34
59
The compiler now correctly rejects the application of generic arguments to the
You can’t perform that action at this time.
0 commit comments