[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another Semaphore question.
- To: Oded Arbel <oded(at-nospam)geek.co.il>
- Subject: Re: Another Semaphore question.
- From: "Stanislav Malyshev a.k.a Frodo" <frodo(at-nospam)sharat.co.il>
- Date: Sun, 6 May 2001 20:55:43 +0300 (IDT)
- cc: guy keren <choo(at-nospam)actcom.co.il>, Linux-IL Mailing list <linux-il(at-nospam)cs.huji.ac.il>
- In-Reply-To: <Pine.LNX.4.30.0105061116340.20140-100000@europa.betalfa.org.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
OA>> I'll think about, but I don't think I'll change from semaphores just yet.
OA>> I don't like the idea of creating temp files for locks, and I can't lock
Actually, cleaning temp file is by far easier than cleaning semaphore.
Especially if your app can be killed any moment.
OA>> against an existing file, since I sometimes need to create several
OA>> different locks in the same application, and w/o creating files, this
OA>> mechanism would need to be way too complicated.
Why? Create one file and lock bytes 1, 2 and 3. BTW, semaphores are much
more scarce resource than files - they are system-wide and defaults are
pretty low on them.
--
frodo@sharat.co.il \/ There shall be counsels taken
Stanislav Malyshev /\ Stronger than Morgul-spells
phone +972-3-9316425 /\ JRRT LotR.
http://sharat.co.il/frodo/ whois:!SM8333
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il