-
Notifications
You must be signed in to change notification settings - Fork 51
Description
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 via loky, thus making maximum use of available CPU resources whenever possible. However, currently, the order in which tasks submitted to loky 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 to loky 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 the Queue implementation within loky suggests the answer is "no" (as then it would be a stack, rather than a queue), but I wanted to confirm.