The TaskStealer data structure is used to perform dynamic load balancing. Each TaskStealer object serves as a common repository of tasks shared by a collection of processors. The program starts with some initial tasks, which may generate more tasks when processed. The TaskStealer object keeps handing off tasks to processors until all scheduled tasks have finished execution and there are no tasks left in the data structure. Tasks are scheduled based on user-supplied hints such as priority, computation granularity, and the penalty when migrated.
The implementation of the TaskStealer data structure uses a distributed load balancing protocol to disseminate tasks to idle processors. The protocol attempts to preserve locality as much as possible by migrating tasks on demand.