On Sun, Dec 13, 2009 at 2:46 PM, Graham Percival
<gra...@percival-music.ca> wrote:

>> >> A more elaborate solution would be either some kind of locking, or to
>> >> check whether the .ps / .pdf exists before actually processing the
>> >> .ly; the latter is still suscepitible to races, though, but a check
>> >> could make the opportunity window smaller.
>> >
>> > I think a .lock would be good.  That's the typical solution to
>> > everything when it comes to parallel processing.  :)
>>
>> Right - the script should do an flock() on the database directory when
>> opening it.
>>
>> (doesnt work on NFS though)
>
> On the entire directory, or just on the lybook-db/??/ dir?

I was thinking about the NFS case, as this is something I encounter at
Google in some of my projects, which I think we should not try to
cater for.

The lock could just be per file, using file system locks (which are
simple to use and efficient).  Probably ly:parse-file should just lock
and unlock the file while processing it.

-- 
Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to