Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proposals/0327-actor-initializers.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ actor Status {
var valid: Bool

// an isolated method
func exchange(with new: Bool) {
func exchange(with new: Bool) -> Bool {
let old = valid
valid = new
return old
Expand Down
2 changes: 1 addition & 1 deletion proposals/0417-task-executor-preference.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Task(executorPreference: preferredExecutor) {
In order to fulfil the requirement that we'd like default actors to run on a task executor, if it was set, we need to introduce a new kind of executor.

This stems from the fact that `SerialExecutor` and how a default actor effectively acts as an executor "for itself" in Swift.
A default actor (so an actor which does not use a custom executor), has a "default" serial executor that is created by the Swift runtime and uses the actor is the executor's identity.
A default actor (so an actor which does not use a custom executor), has a "default" serial executor that is created by the Swift runtime and uses the actor as the executor's identity.
This means that the runtime executor tracking necessarily needs to track that some code is executing on a specific serial executor in order for things like `assumeIsolated` or the built-in runtime thread-safety checks can utilize them.

The new protocol mirrors `Executor` and `SerialExecutor` in API, however it provides different semantics, and is tracked using a different mechanism at runtime -- by obtaining it from a task's executor preference record.
Expand Down
Loading