-
Notifications
You must be signed in to change notification settings - Fork 47
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
Prioritization or somewhat controlled ordering of submitted tasks? #291
Comments
Hello and thanks for the kind words for For now, However, I don't think this is very complex to change this behavior. Indeed, when a job is submitted, it is put in a local |
@tomMoral I'll definitely take a stab at implementing that then. Will send a PR if I get it working :) |
I'd first like to thank the maintainers of the library: it has solved a number of deadlocks and other issues I encountered while attempting to run multiprocess code
I'm making use of
loky
as part of an engine which has jobs submitted to it at random times: these jobs are sharded to run as tasks in parallel vialoky
, thus making maximum use of available CPU resources whenever possible. However, currently, the order in which tasks submitted toloky
runs appears to be fixed, which can result in a later job being "starved"/blocked until a sufficient set of submitted tasks for the former job(s) has completed. While I can manually mitigate this somewhat by reducing the use of available processes for a specific job, this leaves CPU cores unused. Is there a known way to indicate toloky
that certain submitted tasks have a higher priority, or to perhaps submit tasks to be placed at the front of the queue, rather than the back? My brief delve into theQueue
implementation withinloky
suggests the answer is "no" (as then it would be a stack, rather than a queue), but I wanted to confirm.The text was updated successfully, but these errors were encountered: