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

Add a task component kind #261

Open
bocchino opened this issue Jun 8, 2023 · 0 comments
Open

Add a task component kind #261

bocchino opened this issue Jun 8, 2023 · 0 comments
Labels
proposed feature A proposed new feature

Comments

@bocchino
Copy link
Collaborator

bocchino commented Jun 8, 2023

Consider adding a new kind of component task in addition to active, queued, and passive. This would be a component with a task, but no queue. This pattern is useful for blocking on external input, e.g., from a radio. Currently we have to implement this pattern as a passive component with an Os::Task member. It would be better to have a component kind in the model that explicitly declares this pattern. The function that runs on the thread could be pure virtual in the base class and implemented in the derived class.

More generally, we should deprecate the pattern of putting Os::Task members inside components. This pattern makes it impossible to use the FPP model to reason about concurrency. Ideally, every thread in the system should be represented by an active component instance or a task component instance.

@bocchino bocchino added the proposed feature A proposed new feature label Jun 8, 2023
@bocchino bocchino changed the title Threaded component kind Task component kind Nov 16, 2023
@bocchino bocchino changed the title Task component kind Add a task component kind Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposed feature A proposed new feature
Projects
None yet
Development

No branches or pull requests

1 participant