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

Create a parallel Document that's actor protected, with async methods for updating content #120

Open
heckj opened this issue Feb 23, 2024 · 2 comments

Comments

@heckj
Copy link
Collaborator

heckj commented Feb 23, 2024

The idea being ultimately replacing the DispatchQueue protection, and shifting to fully embracing swift's async/await structure. With Swift 6 (fully embracing this safety marker) coming this June (2024), we'll want to make sure at a minimum we pass all Sendable checking.

In addition, the more recent updates to UniFFI (2.6.1) have started to embrace coordinating async calls between Rust and Swift. We're not taking advantage of these yet, but it may prove useful down the road.

Since I think we'll want to maintain backward compatibility for a while, a parallel type to Document would make a lot of sense, and we can slowly shift/deprecate the current version as the experiments vet themselves out in practical (app) use.

@lightsprint09
Copy link
Member

I guess by using an internal DispatchQueue and conforming to Sendable (maybe unsafe) your are already ready for Swift 6. Not sure if it is worth rewriting everything using actors

@heckj
Copy link
Collaborator Author

heckj commented Mar 29, 2024

@lightsprint09 You're correct - I've verified Automerge-swift is completely good for Swift6 mode already, but in learning more about it, it seems like it may be a good way to also accomplish it, so I wanted to try it out

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

No branches or pull requests

2 participants