ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@dotech.com
Subject Re: mutex tasks
Date Thu, 29 Jul 2004 12:48:04 GMT
I removed the race condition by having each parallel ant process using a unique
name. That is really up to the build file, but that is the way it was designed.
So, there shouldn't be any race condition. If 2 files get created at the same
time, each <wait> task will remove their own file and do a random backoff
before trying again.

David
Quoting Phil Weighill-Smith <phil.weighill-smith@volantis.com>:

> David,
> 
> You're far better (from the atomicity and portability points-of-view)
> creating a directory instead of a file - directories can't be re-created
> on any filesystem I've used while files can be (so you might think you
> created the lock file but didn't due to a race condition).
> 
> Phil :n.
> 
> On Thu, 2004-07-29 at 13:11, dak@dotech.com wrote:
> 
> > I've just dome some testing in XP. The locks are simply zero length files
> and
> > nothing more. Also, because of the random backoff approach, I think it
> would be
> > pretty robust. To clean up any locks left over from previous attempts, a
> > mastster scheduler could simply remove all files in the locks directory.
> Should
> > I post code, and a build file example? I could also submit a patch to
> bugzilla
> > with all the stuff attached.
> > 
> > David
> > 
> > Quoting Steve Loughran <stevel@apache.org>:
> > 
> > > 
> > > This is interesting. File locks worry me as they can be quirky on 
> > > platforms and across shared file systems. And on winnt workstation, 
> > > locks never seem to get released when an app crashes (unlike winnt
> server).
> > > 
> > > What have you tested on?
> > > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
> 
> -- 
> Phil Weighill-Smith <phil.weighill-smith@volantis.com>
> Volantis Systems
> 
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> Questions, Problems or Concerns contact messagelabs-admin@dotech.com. 
> ______________________________________________________________________



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message