Skip to content

[Docs][Concurrency] Document custom executors in API docs a bit #73634

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

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented May 15, 2024

Based on https://forums.swift.org/t/how-to-properly-use-custom-executor-on-global-actor/71829/ I realized we don't do a good job documenting custom executors (and other things, but let's start with this) on API docs.

This introduces some basic example and wording in the Actor and SerialExecutor types.

More should be preferably done in the TSPL, but we'll handle that separately.

Resolves rdar://128060412 rdar://129115666

@ktoso ktoso requested review from amartini51 and hborla May 15, 2024 02:59
@ktoso ktoso added concurrency Feature: umbrella label for concurrency language features documentation labels May 15, 2024
@ktoso
Copy link
Contributor Author

ktoso commented May 15, 2024

Would welcome some review if that's the tense and format we're okey with -- if so, I'll follow up with more documentation on APIs.

@ktoso
Copy link
Contributor Author

ktoso commented May 15, 2024

@swift-ci please smoke test

1 similar comment
@ktoso
Copy link
Contributor Author

ktoso commented Jun 4, 2024

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Jun 4, 2024

Second commit now resolves rdar://129115666 and did some review followup about wording as well that Michael suggested -- we're now more emphasizing the every actor has its own executor and showing the "shared" case only at the very end and warning about it.

ktoso added 2 commits June 4, 2024 15:42
Include review feedback and show how to customize a single actor by
passing an executor through initializer
@ktoso ktoso force-pushed the wip-document-exexecutors-apidoc branch from 757c5be to 89adc82 Compare June 4, 2024 06:42
@ktoso
Copy link
Contributor Author

ktoso commented Jun 4, 2024

@swift-ci please smoke test

@ktoso ktoso merged commit 4fc0f3a into swiftlang:main Jun 4, 2024
3 checks passed
@ktoso ktoso deleted the wip-document-exexecutors-apidoc branch June 4, 2024 21:27
@ktoso ktoso changed the title [Concurrency] Document custom executors in API docs a bit [Docs][Concurrency] Document custom executors in API docs a bit Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concurrency Feature: umbrella label for concurrency language features documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant