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

Initial public draft of custom executors proposal. #2654

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

al45tair
Copy link
Contributor

Add write up of custom executor proposals. There are still some concerns surrounding integration with Dispatch that need working through.

Use `any TaskExecutor` instead of `any Executor` for `Task.defaultExecutor`.

Rename `ExecutorJobKind` to `ExecutorJob.Kind`.

Add `EventableExecutor`; replace `SerialRunLoopExecutor` with `MainExecutor`,
then make `MainActor` and `PlatformMainExecutor` use the new protocol.
The previous iteration would have required us to make calling the
allocation methods a fatal error, and would have meant executors had
to check explicitly for the `.task` job kind before using them.

Instead, if we add a new `LocalAllocator` type, we can have an
`allocator` property that is `nil` if the job doesn't support allocation,
and a valid `LocalAllocator` otherwise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant