Everything you describe seems to be right to me. Oliver
On Thu, 24 Mar 2005 09:30:59 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I'm a newbie with the transaction.locking package but I'm very interrested in > using the ReadWriteUpgradeLockManager class. > > In my project, I need to use the lock manager as following : I have 3 locks > types( Shared, Exclusive, Update). Readers must obtain Shared locks, writers > must obtain Exclusive locks. If there are Shared locks on a data when a writer > wants to obtain an Exclusive lock, the writer obtain an Update lock on the > data. When the Update lock is obtained, it becomes impossible for readers to > obtain new shared locks on this data but the readers keep going on until the > end of their transactions. When all the readers free all the Shared locks on > the data, the Update lock becomes an Exclusive lock and this automatically. > > This behaviour is more or less the same implemented in the > ReadWriteUpgradeLockManager class. If I well understand the mechanism, I need > to obtain first an Update lock and only when I ask for a write lock on the > same > data I will obtain an Exclusive lock and readers can't obtain anymore Shared > locks on the data. > > Is someone have an idea or an example to show me how to use the existing class > to obtain the good behaviour for my project ? > > Thanks for all, > > Mel > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
