[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Database locking



At 12.10 9/28/97, Walter Hinton wrote:
>But, the Berkeley DB Faq (http://mongoose.bostic.com/db/faq.html) says:
>"Yes. DB supports locking and concurrent access. Applications using the
>standard database formats do not need to do the locking themselves, the
>access methods do it for them. "
>
>Well, I want to use locking if I need to but don't want to do what's not
>necessary. Please tell me where to go read about it. I'd like to make sure I
>misunderstand everything I'm confused about before I try to use it.

What I might do is create a file "mydbmlock" and then do something like this:

use Mac::Files;
FSpSetFLock $file;      #lock
FSpRstFLock $file;      #unlock

Lock it to lock it, unlock it to unlock it.  NOTE: there is a bug in
MacPerl 5.1.3r2, such that you cannot call the FSpRstFLock method directly.
Instead, you need to call "Mac::Files::FSpRstFLock" (I think that works).

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch