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

console: sort task list #4

Closed
hawkw opened this issue May 4, 2021 · 0 comments · Fixed by #12
Closed

console: sort task list #4

hawkw opened this issue May 4, 2021 · 0 comments · Fixed by #12
Labels
S-feature Severity: feature. This is adding a new feature.
Milestone

Comments

@hawkw
Copy link
Member

hawkw commented May 4, 2021

right now, in the top view, it's not possible to sort the tasks by anything --- they are stored in a hashmap, and rendered in iteration order.

we should probably find a nice way to make them sortable, and (eventually) let the user control which key they're sorted by, like in real top(1). it's useful to store the tasks in a hashmap for applying updates, since we can index a particular task and update its stats, or quickly remove them. ideally, we should find a way to sort them without having to copy from the hashmap into a vec every time we render the list of tasks.

one thing we could do is make the actual task data refcounted, the actual task data, and then construct btrees for every sortable parameter as different sorted views of the task list, so that every sort is ready to go when the user selects it...

@hawkw hawkw added the S-feature Severity: feature. This is adding a new feature. label May 4, 2021
@hawkw hawkw closed this as completed in #12 May 5, 2021
@seanmonstar seanmonstar added this to the 0.1 milestone Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-feature Severity: feature. This is adding a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants