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

Work blocked on pollable object #10749

Closed
pdunaj opened this issue Oct 22, 2018 · 1 comment
Closed

Work blocked on pollable object #10749

pdunaj opened this issue Oct 22, 2018 · 1 comment

Comments

@pdunaj
Copy link
Collaborator

pdunaj commented Oct 22, 2018

At the moment Zephyr has two kinds of work: executed straightaway and executed with a delay. It would be useful to add a third kind - work executed when provided pollable object is ready (or any object from the given set).

This would be useful in cases when user has a need to wait for a blocking API (e.g. read) but would like to avoid creating a dedicated thread to handle blocking (that would cost RAM used for the thread's stack).

This feature could be implemented by creating a thread that would wait for any of the pollable object to be ready and when it is it would submit an associated work to be executed.
It may be however better to create a hook in the scheduler and when a pollable object is ready submit an associated work there (e.g. much like unblocking the thread waiting for mutex).

@pdunaj
Copy link
Collaborator Author

pdunaj commented Oct 22, 2018

Duplicate of #10748

@pdunaj pdunaj marked this as a duplicate of #10748 Oct 22, 2018
@pdunaj pdunaj closed this as completed Oct 22, 2018
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

1 participant