Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SE-0417] Revise Task(executorPreference:) ownership semantics #2504

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jun 26, 2024

This is just a cleanup of a semantics section which previously showed what was unsafe, but actually isn't unsafe anymore since we fixed it.

This should not require a re-review, as it does not change API surface in any way, it's more of a bugfix really, and making the proposal match reality now.

  1. 5a8ec8c revises the ownership semantics of Task initializers. They were previously documented to NOT own the task executors and pushed the responsibility onto developers to keep executors alive (similar to serial executors).
Removed some changes since not necessary anymore
  1. 3ad8d51 is a necessary revision in order to uphold default actor isolation safety when a task executor is used. Without this change task executors could violate actor isolation and even run concurrent code on a single actor. We must address this by forwarding the serial executor to the task execution such that it can do the usual actor locking.

@rjmccall rjmccall added content change Content change to an existing document LSG Contains topics under the domain of the Language Steering Group labels Jun 27, 2024
@DougGregor DougGregor merged commit 9b7f11c into swiftlang:main Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content change Content change to an existing document LSG Contains topics under the domain of the Language Steering Group
Projects
None yet
4 participants