We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68a4b31 commit 511add6Copy full SHA for 511add6
test/Concurrency/isolated_parameters.swift
@@ -333,3 +333,18 @@ func execute<ActorType: Actor>(
333
task(isolatedActor)
334
}
335
336
+
337
+actor ProtectsDictionary {
338
+ var dictionary: [String: String] = ["A": "B"]
339
+}
340
341
+func getValues(
342
+ forKeys keys: [String],
343
+ from actor: isolated ProtectsDictionary
344
+) -> [String?] {
345
+ // A non-escaping, synchronous closure cannot cross isolation
346
+ // boundaries; it should be isolated to 'actor'.
347
+ keys.map { key in
348
+ actor.dictionary[key]
349
+ }
350
0 commit comments