diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index b4fc64e753..bc08c814d1 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml @@ -1929,6 +1929,38 @@ not careful. + [number_threads]: + Limits tasks to a specific number of simultaneous threads + during execution. + This varflag is useful when your build host has a large number + of cores but certain tasks need to be rate-limited due to various + kinds of resource constraints (e.g. to avoid network throttling). + number_threads works similarly to the + BB_NUMBER_THREADS + variable but is task-specific. + + Set the value globally. + For example, the following makes sure the + do_fetch task uses no more than two + simultaneous execution threads: + + do_fetch[number_threads] = "2" + + Warnings + + + Setting the varflag in individual recipes rather + than globally can result in unpredictable behavior. + + + Setting the varflag to a value greater than the + value used in the BB_NUMBER_THREADS + variable causes number_threads + to have no effect. + + + + [postfuncs]: List of functions to call after the completion of the task.