-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Right now, we have a sort of 2-phase init pattern for starting services - the user calls one function to instantiate the service, and then the user has to manually start all the tasks the service requires to function. This leaves the opportunity for the caller to screw up - they can fail to start the tasks. The upside of doing it this way is that it breaks our dependency on the async executor, so we can run on e.g. tokio, but this is a pretty substantial drawback.
Investigate ways to start tasks as part of the new/init function so users don't have the opportunity to get this wrong. We have a couple leads to investigate:
- Maybe we can do something with macros where we decorate our task functions with embassy task decorations if the user somehow communicates to us that it's using embassy as the executor?
- Maybe we can figure out how the embassy task decorations work and manually implement something that lets us use them in the same way as e.g. tokio tasks?
- ...something else?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
No status