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

Formalize Workers into Trait #1371

Open
insipx opened this issue Dec 4, 2024 · 0 comments
Open

Formalize Workers into Trait #1371

insipx opened this issue Dec 4, 2024 · 0 comments
Labels
enhancement New feature or request medium

Comments

@insipx
Copy link
Contributor

insipx commented Dec 4, 2024

Device + Consent sync operate with LocalEvents, which are events global to a single client instance. Workers are spawned on client instantiation and do work for the life of the client. Right now we only have a single worker for sync, but its reasonable to foresee other possible workers in the future.

If this pattern becomes useful, it would be great to formalize workers into a trait, where workers can be dynamically registered to the client and spawned on instantiation together. This worker pattern so far is useful for separating concerns for tasks that don't have strict deadlines (like syncing)

@insipx insipx added enhancement New feature or request medium labels Dec 4, 2024
@insipx insipx added this to libxmtp Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium
Projects
Status: No status
Development

No branches or pull requests

1 participant