bug-make
[Top][All Lists]
Advanced

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

Re: Fwd: [bug #33138] .PARLLELSYNC enhancement with patch


From: Eli Zaretskii
Subject: Re: Fwd: [bug #33138] .PARLLELSYNC enhancement with patch
Date: Thu, 25 Apr 2013 22:06:18 +0300

> Date: Thu, 25 Apr 2013 19:36:28 +0100
> From: Tim Murphy <address@hidden>
> Cc: "address@hidden" <address@hidden>
> 
> 1)  sem_timedwait() in posix lets you timeout so in a big build when
> something crashes or just sits around, there is at least the option of
> printing an error message or giving up on locking from that point on which
> is a bit of a godsend if it happens overnight and there's no-one to restart
> the build.

How much would you use for the timeout, though?  A sub-Make could
legitimately run for a very long time, depending on what's in the
Makefile.

FWIW, I currently let Make wait forever for the mutex.

> With stdio and file locks I don't know if this is a problem
> anyhow for crashes (are locks automatically released?)

Yes, locks are automatically released once the file descriptor is
closed (which happens on a crash or exit).

> but the behaviour between windows and linux might be different.

It is similar: when a process holding a mutex exits or crashes on
Windows, the mutex is released.  If another process was waiting for
the mutex, it gets a special indication about such calamities (because
in some cases of synchronization, that might mean the shared resource
is in inconsistent state), but in our case, we don't care, at least
the way I wrote the code in its current shape.



reply via email to

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