Commit 2f52b65
committed
[Concurrency] Apply
async for-in loops.
Async iterators are not `Sendable`; they're only meant to be used from
the isolation domain that creates them. But the `next()` method runs on
the generic executor, so calling it from an actor-isolated context passes
non-`Sendable` state across the isolation boundary. `next()` should
inherit the isolation of the caller, but for now, use the opt out.
(cherry picked from commit 0c6c369)nonisolated(unsafe) to iterator variables for1 parent 4f70eb2 commit 2f52b65
File tree
2 files changed
+17
-0
lines changed- lib/Sema
- test/Concurrency
2 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4413 | 4413 | | |
4414 | 4414 | | |
4415 | 4415 | | |
| 4416 | + | |
| 4417 | + | |
| 4418 | + | |
| 4419 | + | |
| 4420 | + | |
| 4421 | + | |
| 4422 | + | |
| 4423 | + | |
| 4424 | + | |
| 4425 | + | |
| 4426 | + | |
| 4427 | + | |
| 4428 | + | |
4416 | 4429 | | |
4417 | 4430 | | |
4418 | 4431 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
0 commit comments