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

Idea: tokio-idle #669

Closed
vorner opened this Issue Sep 27, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@vorner
Contributor

vorner commented Sep 27, 2018

Hello

On the gitter channel, I mentioned I'd find something that would be able to run bits of work at „idle“ time (eg. no tasks currently ready to make progress) useful. I think this can live outside of the base tokio package, but I want to let others know and coordinate/consult.

This is something else than priorities ‒ usually, with priorities, one wants to guarantee that the low prio tasks will get run too, even if getting smaller share of time. With this, the „idle“ work may never be run if the loop is not idle.

I have some vague idea what to do in the current-thread scenario, but I don't even know what should be done in the threaded case, not to mention how.

I'm putting some experiment/POC together here: https://github.com/vorner/tokio-idle.

I'm wondering if it makes sense to put another CurrentThread as part of the idle „layer“. If so, I'd need to make some changes to the API ‒ would it be OK to add something like LocalHandle to it (like Handle, but one that can't travel to other threads and can spawn !Send tasks)?

@tobz tobz closed this Dec 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment