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

Reusable task-pool scheduler #79

Open
MasonProtter opened this issue Mar 12, 2024 · 2 comments
Open

Reusable task-pool scheduler #79

MasonProtter opened this issue Mar 12, 2024 · 2 comments
Labels

Comments

@MasonProtter
Copy link
Member

Potentially related to or overlapping with #75, I think it'd be good if there was a scheduler that had a pre-allocated set of Tasks stored inside it that are then re-used, like how Polyester.jl handles its tasks.

This could help users avoid allocations and GC-latency, and also potentially do other things like re-use TaskLocalValues between multiple calls to tmapreduce. Definitely an advanced feature we shouldn't recommend to everyone, but in certain circumstances, it could be useful.

@carstenbauer
Copy link
Member

I agree, this could be useful. If we want to implement new schedulers - say a dynamic load-balancing one that only uses a fixed subset of the threads - we probably need/want something like this. However, this is isn't just more advanced from a users POV but also (much?) more ambitious for us. AFAIR, Polyester jumps through a number of hoops to make the basics of this work.

@MasonProtter
Copy link
Member Author

I think it doesn't necessarily need to be so complicated as Polyester, e.g. here's a much simpler go at the same idea: https://github.com/JuliaFolds2/FoldsThreads.jl/blob/master/src/taskpool.jl

but yes, this'd require a lot of design work to figure out properly. Not a short-term idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants