TestSpinLock
Test using volatile fields to ensure we don't read from a version that is
concurrently written to.
| Methods |
| static void |
main(String... a)
Run just this test.
|
| static void |
main(String... a) throws Exception
Run just this test.
Parameters:
a - ignored
|
| TestSpinLock.Data |
copyOnWrite()
Clone the data object if necessary (if the write version is newer than
the current version).
|
| TestSpinLock.Data |
copyOnWrite()
Clone the data object if necessary (if the write version is newer than
the current version).
Returns:
the data object
|
| void |
test()
|
| void |
test() throws Exception
|
data
The current data object.
writeVersion
The version to use for writing.