Skip to content
Discussion options

You must be logged in to vote

Having a global actor would help dependencies isolated on the same actor to interdepend synchronously. As I can imagine this happening in user code bases, I'm not sure there is something the library can do to help in this area, or maybe I'm not understanding your suggestion correctly.

You can of course isolate parts of your dependencies to global actors, and this is "commonly" performed with MainActor. It is also possible to completely isolate dependencies, but you'll need to mark liveValue & co as nonisolated to conform to DependencyKey (if you're using Self as Value), and you'll need to do a little gymnastic to synchronously create values of your isolated dependency to conform to the pr…

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@idelfonsog2
Comment options

@nashysolutions
Comment options

@mbrandonw
Comment options

@nashysolutions
Comment options

@tgrapperon
Comment options

Answer selected by idelfonsog2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants