From 63385999cddbe02b752f91a31c70184972513c91 Mon Sep 17 00:00:00 2001 From: Kevin Ziroldi Date: Mon, 23 Mar 2026 10:39:22 +0100 Subject: [PATCH] Update outdated work stealing docs regarding worker restrictions --- docs/source/work-stealing.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/source/work-stealing.rst b/docs/source/work-stealing.rst index 83afd795b7f..bb9b5abf8ac 100644 --- a/docs/source/work-stealing.rst +++ b/docs/source/work-stealing.rst @@ -79,8 +79,14 @@ than workers with just a few excess tasks. Restrictions ~~~~~~~~~~~~ -If a task has been specifically restricted to run on particular workers (such -as is the case when special hardware is required) then we do not steal. +If a task has been specifically restricted to run on a subset of workers +(for example, using ``workers=...`` and ``allow_other_workers=False``, or by +requiring specific ``resources``, such as for specific hardware requirements +or constrained environments), the scheduler will still actively attempt to +steal the task to balance the load. +However, the scheduler will strictly enforce those restrictions during the steal. +The task will only ever be stolen by an idle worker that is explicitly part of +the allowed worker subset and possesses the necessary available resources. Choosing tasks to steal -----------------------