Skip to content

Commit 93dddab

Browse files
Add mention of -disable-dynamic-actor-isolation; fix #126 (#127)
1 parent 3e4a9ce commit 93dddab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Guide.docc/IncrementalAdoption.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ When an un-migrated module hasn't yet done this, it will result in incorrect
230230
actor inference.
231231
This code will compile without issue but crash at runtime.
232232

233+
> Note: It is not possible for the compiler to detect or diagnose the
234+
_lack_ of compiler-visible information.
235+
233236
To workaround this, you can manually annotate the closure with `@Sendable.`
234237
This will prevent the compiler from inferring `MainActor` isolation.
235238
Because the compiler now knows actor isolation could change,
@@ -253,6 +256,13 @@ class PersonalTransportation {
253256
}
254257
```
255258

259+
Alternatively, it is also possible to disable runtime isolation assertions
260+
for the module with the `-disable-dynamic-actor-isolation` compiler flag.
261+
This will suppress all runtime enforcement of dynamic actor isolation.
262+
263+
> Warning: This flag should be used with caution.
264+
Disabling these runtime checks will permit data isolation violations.
265+
256266
## Integrating DispatchSerialQueue with Actors
257267

258268
By default, the mechanism actors use to schedule and execute work

0 commit comments

Comments
 (0)