Skip to content

Commit 45826d2

Browse files
committed
Minor wording and heading changes.
Replace a few uses of "called" with "used" when talking about using protocol requirements. Also removed the subheadings in the Using Isolated Conformances section.
1 parent e46557f commit 45826d2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

TSPL.docc/LanguageGuide/Concurrency.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,16 +1670,14 @@ extension Person: nonisolated Equatable {
16701670
### Data-Race Safety for Isolated Conformances
16711671

16721672
Swift prevents data races for isolated conformances
1673-
by ensuring that protocol requirements are only called
1673+
by ensuring that protocol requirements are only used
16741674
on the global actor that the conformance is isolated to.
16751675
In generic code,
16761676
where the concrete conforming type is abstracted away,
1677-
protocol requirements can be called through type parameters or `any` types.
1677+
protocol requirements can be used through type parameters or `any` types.
16781678

16791679
#### Using Isolated Conformances
16801680

1681-
##### Generic Code
1682-
16831681
A conformance requirement to `Sendable` allows generic code to send parameter
16841682
values to concurrently-executing code. If generic code accepts non-`Sendable`
16851683
types, then the generic code can only use the input values from the current
@@ -1720,8 +1718,6 @@ results in an error,
17201718
because it would allow calling the main actor isolated implementation of `perform`
17211719
from outside the main actor.
17221720

1723-
##### Dynamic Casting
1724-
17251721
Generic code can check whether a value conforms to a protocol
17261722
through dynamic casting.
17271723
The following code has a protocol `P`,
@@ -1778,7 +1774,7 @@ so the dynamic cast fails and `perform` is not called.
17781774

17791775
#### Restricting Isolated Conformances in Concurrent Code
17801776

1781-
Protocol requirements can be called
1777+
Protocol requirements can be used
17821778
through instances of conforming types and through metatype values.
17831779
In generic code,
17841780
a conformance requirement to `Sendable` or `SendableMetatype`

0 commit comments

Comments
 (0)