[concurrency-interest] Concurrent sequential access to a mutable field without the volatile modifier
David M. Lloyd
david.lloyd at redhat.com
Fri Jan 7 12:49:08 EST 2011
On 01/07/2011 11:14 AM, Marco Villalobos wrote:
> Sébastien,
>
> It is very difficult to prove that thread unsafe code or bad
> concurrency will fail.
I've always wished there was a testing JVM emulator which was
deliberately designed to exacerbate threading problems - it would, for
example, never publish data between threads without a proper volatile or
synch access, or do so randomly based on configuration. Also it would
be configurable to do stuff like deliberately starve certain threads, or
inject context switches or allow the user to manually set up other
different concurrency scenarios.
Such a thing would be devilishly hard to create, but it would be
incredibly useful for testing concurrent code and algorithms.
--
- DML
More information about the Concurrency-interest
mailing list