[concurrency-interest] Interesting story from Dave Dice
hans.boehm at hp.com
Mon May 25 20:32:49 EDT 2009
> From: Péter Kovács
> ... Apart
> from the awkward name for this JNI constant, it appears to be
> a pure operator error not to use JNI_ABORT for an immutable array.
Agreed, at least if there may be concurrent readers. Anything else results in a data race, which is by definition a bug on the C/C++ side, and bad practice on the Java side.
If the array were updated, I don't see how this could be correct in the presence of data races, since the update may have happened in place, and the C code makes no guarantees in the presence of data races.
More information about the Concurrency-interest