On 11 Jul 2011, at 10:45, Manik Surtani wrote:
On 4 Jul 2011, at 07:57, Galder ZamarreƱo wrote:
> I get the feeling that those atomic operations are particularly useful when
transactions are not used cos they allow you to reduce to cache operations to one, hence
avoiding the need to use a lock or synchronized block, or in our case, a transaction.
Precisely. I think the atomic ops should be documented such that they are not used
within a transaction scope, possibly either:
1) suspending any ongoing tx if used, or
2) throwing an illegal state exception if used within a tx scope
+1 for the 2nd
approach. At least up to the moment one comes with a use case for using them within a tx.