SPUG: Does tie() do file-locking?
tim at consultix-inc.com
Wed Jun 14 13:29:28 CDT 2000
>Camel p155 (dbmopen) says something about this. Not a lot, but hope it
Aha! p. 155 points me to p. 392-393 for details on DB_File, where
there's an example showing how you can lock the tied-hash's entire file.
The upshot is that all you have to do is toggle whole-file locks before
and after every modification to your tied-hash and you can feel safe
(Unfortunately, doing so completely shatters the illusion that you're
dealing with a hash!)
I was hoping for something more automatic and sophisticated than this. . .
Since the DB_File module knows as well as I do when I'm changing the hash,
why can't I just tell it to do the locking for me?
| Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# |
| Email: tim at consultix-inc.com Web: http://www.consultix-inc.com |
| CLASSES; 6/12: Int. Perl 6/15: Pat. Matching 8/14: UNIX 8/21: Shell |
| DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
For Subscriptions, Email to majordomo at pm.org: ACTION spug-list EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address
More information about the spug-list