8000 Use Swift 5.9 custom executor by inamiy · Pull Request #80 · Actomaton/Actomaton · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use Swift 5.9 custom executor #80

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 1 commit into from
Sep 23, 2023
Merged

Use Swift 5.9 custom executor #80

merged 1 commit into from
Sep 23, 2023

Conversation

inamiy
Copy link
Member
@inamiy inamiy commented Sep 23, 2023

This PR refactors MainActomaton by changing it from public final class to package protocol (thus this PR is a breaking change), and move previous implementation into package class MainActomaton1 (ver 1), then adding a new MainActomaton2 (ver 2).

MainActomaton2 is a full replacement of MainActomaton1 using Swift 5.9's Custom Executor, which is available from macOS 14.0 / iOS 17.0.
In Swift 5.9, MainActomaton2 is now capable of inheriting actor Actomaton's existing code without code duplication.
Same as previous ver 1, ver 2 also always runs on top of MainActor's executor by using custom (replaced with MainActor) executor and Actor.assumeIsolated method.

MainActomaton2 is package-internally used in ActomatonUI.Store(Core) , so users won't usually notice the difference.

@inamiy inamiy self-assigned this Sep 23, 2023
@inamiy inamiy changed the title Use Swift 5.9 custom executor & add MainActomaton2 Use Swift 5.9 custom executor Sep 23, 2023
@inamiy inamiy merged commit ac44ab1 into main Sep 23, 2023
@inamiy inamiy deleted the swift-5.9-custom-executor branch September 23, 2023 02:30
@inamiy inamiy added this to the 0.8.0 milestone Sep 23, 2023
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
0