[concurrency-interest] Thread-safe iterator

Johannes.Lichtenberger Johannes.Lichtenberger at uni-konstanz.de
Fri Feb 17 10:54:27 EST 2012


On 02/17/2012 07:42 AM, chakravarthy.varaga at wipro.com wrote:
> Hi,
> 
> 	Is there a guarantee that your protected final long resetToLastKey() is not accessed outside your iteration and your concrete next() implementation isn't accessed outside the transaction?

Well, next() is implemented in the abstract skeleton implementation with
a simple mWtx.moveTo(nextKey); and it should in general never be
overriden, but that must be properly documented.

resetToLastKey() also should never be exposed, but it has to be
protected as the abstract skeleton impl. is used from other packages.

kind regards,
Johannes





More information about the Concurrency-interest mailing list