Julie wrote: 
> Both of the file-based mechanisms can fail if the two
> processes are pounding on a non-local filesystem.
> 
> They also tend to be DOG SLOW.

Agreed. The "semaphore" is the way to go.

Of course unless you're trying to synchronize across multiple systems it
wouldn't make sense to put the above files on say an NFS mounted
partition anyway. If you need your lock cross machine boundries a
"semaphore" would be out as it's only local. In which case you would
probably be stuck with the cross mounted file as your best, if not only
solution. If that is the situation I would suggest using "flock()" which
does work relatively reliably, at least in Sun environments, on NFS
mounted partitions.

                        - Matt
begin:vcard 
n:Fahrner;Matt
tel;pager:(603) 639-4142
tel;fax:(603) 443-6190
tel;work:(603) 448-4100 xt 5150
x-mozilla-html:FALSE
url:http://www.gizzy.com/matt
org:Burlington Coat Factory Warehouse;MIS Networking
version:2.1
email;internet:[EMAIL PROTECTED]
title:Manager of Networking
adr;quoted-printable:;;2 South Park St.=0D=0AWillis House;Lebanon;NH;03766;USA
x-mozilla-cpt:;-3648
fn:Matt Fahrner
end:vcard

Reply via email to