[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspell-devel] Mutex, for static objects
From: |
Kevin Atkinson |
Subject: |
Re: [aspell-devel] Mutex, for static objects |
Date: |
Tue, 26 Oct 2004 10:49:05 -0600 (MDT) |
On Tue, 26 Oct 2004, Gary Setter wrote:
> However, what if making a mutex fails after main is called? What should
> be done? How can the program determine if the failure is legitimate?
> ...
> Does the unix version of aspell have the same situation? What
> should be done when an attempt to lock via a mutex fails? Are
> there other ways the code could be improved?
The making of a mutex SHOULD NOT fail. If it does the appropriate action
is to abort. Locking a mutex should also always succeed. If some object
is already holding the lock than the call to lock the mutex should block
until the lock is released.
--
http://kevin.atkinson.dhs.org