Hi,

I want to use the ReadWriteLockManager and ReadWriteLock on interval. To
facilitate the operation on interval I use the package xxl.core.util.Interval1D.

The LockManager works well if I try to get and release locks on same interval.
For example, a first thread T1 get a ReadLock on the interval I[1, 122] and then
a second thread T2 try to obtain a WriteLock on I, T2 will wait until T1 release
its lock on I.

The LockManager does not work well in this case : a first thread T1 get a
ReadLock on the interval I1[1 , 5] and then a second thread T2 try to obtain a
WriteLock on I2[4 , 7], T2 will obtain is lock and we will have incompatible
locks on the intersection of I1 and I2 [4, 5].

The problem is that I1 and I2 are two different objects for the LockManager.

Is that possible to modify the ReadWriteLock and the ReadWriteLockManager, in
order to determine when intervals intersect. It must verify the compatibility of
the lock or wait for the release when it is incompatible ?

I expect I am clear, if not ask me for details :o)

Thanks for your help,

Mel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to