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

maitake: consider some kind of user-provided runtime hooks #296

Open
hawkw opened this issue Aug 11, 2022 · 3 comments
Open

maitake: consider some kind of user-provided runtime hooks #296

hawkw opened this issue Aug 11, 2022 · 3 comments
Labels
crate/maitake Related to the `maitake` crate kind/enhancement New feature or request needs/design

Comments

@hawkw
Copy link
Owner

hawkw commented Aug 11, 2022

since maitake is intended to be used as a lower-level "async runtime construction kit" rather than a complete out-of-the-box solution, we might want to figure out some way for users to provide additions hooks that run on events that occur "inside" the runtime.

currently, the Schedule trait is user-implementable, so it's possible for user code to implement it for a type that wraps a maitake provided implementation of Schedule and runs additional functionality in Schedule methods. it might be worth adding an example of this in the documentation.

but, the Schedule trait doesn't have methods for a number of other events that user code might want to hook into. in particular, it could be worth adding methods for:

  • binding a new task to a scheduler
  • deallocating a task
  • ???
@hawkw
Copy link
Owner Author

hawkw commented Aug 11, 2022

see also #238

@hawkw
Copy link
Owner Author

hawkw commented Aug 11, 2022

@jamesmunns any additional things that happen inside the scheduler that you might want to hook into?

@hawkw hawkw added crate/maitake Related to the `maitake` crate kind/enhancement New feature or request needs/design labels Aug 11, 2022
@jamesmunns
Copy link
Collaborator

I don't have any feedback! I don't feel like I've needed anything, but a lot of the stuff like this that I've needed ends up living in the global kernel/userspace scheduler instance instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/maitake Related to the `maitake` crate kind/enhancement New feature or request needs/design
Projects
None yet
Development

No branches or pull requests

2 participants