help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: single-threading targets although make was invoked with -jX ?


From: Per Jessen
Subject: Re: single-threading targets although make was invoked with -jX ?
Date: Wed, 04 May 2011 17:20:37 +0200
User-agent: KNode/0.10.4

David Boyce wrote:

> On Wed, May 4, 2011 at 5:11 AM, Per Jessen <address@hidden> wrote:
>> Okay, let me rephrase that - when you're otherwise running everything
>> in parallel, how do you force some targets to be single-threaded,
>> i.e. never run concurrently?  I tend to use a lock-construct, but
>> it's not exactly optimal.
> 
> I don't know of any way for make to do this on its own but I just
> added a feature to my program "syncsh" to do something similar. Feel
> free to have a look at the README at https://github.com/boyski/SYNCSH.

Hi David

yeah, SYNCSH_SERIALIZE is equal to what I do today using this construct:

(flock -s 200; some-command $^ $@) 200>/var/lock/some-lockfile

It satisfies the single-thread requirement, but in massively parallel
runs, several of these often end up waiting for each other. It would be
optimal if make knew not to submit more than 1 at a time, I was just
wondering if I'd skipped a page in the manual :-)


/Per Jessen, Zürich




reply via email to

[Prev in Thread] Current Thread [Next in Thread]