Matt,

From: Matt Fahrner <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 14, 2000 09:10
Subject: Re: synchronization between processes (not threads)


> Yes a "semaphore" is very portable (at least within Unix environments).
> You can also use "flock()" on a file. Another trick is just to create
> and destroy a file as a sort of gate condition.

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.

-- Julie.

> - Matt
>
> Alan Cox wrote:
> >
> > > pthread_mutex_xxxx, but this is for threads.  Do I use a semaphore?
Seems
> > > like overkill; I just need a binary yes or no lock.
> >
> > Portably you use a semaphore. If you want to be faster and non portable
you
> > can use shared memory regions and tricks but those may not work on all
cpus
> >
> > --
> > To unsubscribe:
> > mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

-- 
To unsubscribe:
mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

Reply via email to