rob_au has asked for the wisdom of the Perl Monks concerning the following question:
| CLEAR | write lock |
| DELETE | write lock |
| EXISTS | write lock |
| FETCH | read lock |
| FIRSTKEY | read lock |
| NEXTKEY | read lock |
| STORE | write lock |
| TIEHASH | ? |
| UNTIE | ? |
I am however unsure of what locking or synchronisation, if any, I should be performing upon TIEHASH or UNTIE - Note that I have not outlying any specifics of the underlying data source or locking mechanism as these are user-modifiable components of this module. eg.
tie %hash, 'MyClass', { 'Lock' => 'Semaphore', 'Store' => 'DB_File' }, { .. more options .. } or die $!;
As such what I am looking for with this post is a more general discussion as to the general aspects of synchronisation locking within tied hashes rather than specific approaches or caveats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Locking and synchronisation within tied hashes
by perrin (Chancellor) on Sep 08, 2002 at 13:18 UTC | |
|
Re: Locking and synchronisation within tied hashes
by Aristotle (Chancellor) on Sep 08, 2002 at 13:05 UTC | |
by rob_au (Abbot) on Sep 08, 2002 at 13:14 UTC | |
by Aristotle (Chancellor) on Sep 08, 2002 at 13:28 UTC | |
by rob_au (Abbot) on Sep 08, 2002 at 13:35 UTC | |
by Aristotle (Chancellor) on Sep 08, 2002 at 13:47 UTC |