13 Dec
2011
13 Dec
'11
11:11 p.m.
Le 08/12/11 18:30, Kelvin Chung a écrit :
On 2011-12-08 16:58:00 +0000, Vicente Botet said:
In general unlocking a shared lock and lock a upgrade lock is not a good idea as the read data on the shared lock scope can be changed by another thread as soon as you release the lock and so you computation is not coherent.
My data is "single-assignment" style: once an Input/Output pair is written into the Cache it is never modified, so that isn't an issue for me as long as I re-read after getting the upgrade lock. However, wouldn't re-reading after getting the upgrade lock address this in general?
Yes, this is equivalent to re-trying the whole 'transaction' Vicente