[yocto] Customize Number of Threads per Task?

Paul Eggleton paul.eggleton at linux.intel.com
Fri May 17 01:53:55 PDT 2013


Hi Travis,

On Friday 17 May 2013 00:40:51 Post, Travis wrote:
> I’ve written a bitbake class that adds a custom task in-between do_configure
> and do_compile, called ‘do_send_to_remote’. Is there any way for Yocto to
> allow only one instance of this task to run at a time? I know I can set
> BB_NUMBER_THREADS = 1, but that will slow down everything. Is there a way
> to do something like: BB_NUMBER_THREADS[do_send_to_remote] = 1?

I don't think we have anything quite like that, but we do have support for 
locking via a "lockfiles" parameter on a task function; e.g. from 
rootfs_rpm.bbclass:

do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"

That should ensure only one instance of the task's code gets to run at a time.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list