RFR (M) CR 8023234: StampedLock serializes readers on writer unlock
Martin Buchholz
martinrb at google.com
Wed Aug 21 18:53:09 UTC 2013
OK, approved!
I would do things differently, and there is the deeper problem that openjdk
provides no test infrastructure for multi-threaded tests, which we are
suffering from here. Now that testng is being used, it's a good time for
someone to import test infrastructure from JSR166TestCase
On Wed, Aug 21, 2013 at 10:46 AM, Aleksey Shipilev <
aleksey.shipilev at oracle.com> wrote:
> Hi Martin,
>
> On 08/21/2013 06:28 AM, Martin Buchholz wrote:
> > If a Reader throws, the test might still pass, since only throwing from
> > the main thread matters. See infrastructure in JSR166TestCase, e.g.
> > threadUnexpectedException.
>
> Yes. I still don't think there is a value in catching the exceptions in
> the threads for this concrete regression test. Should the reader die
> with the exception, the test will fail anyway, since enough readers are
> not available.
>
> > OTOH, there seems no value in converting exceptions in the main thread
> > to ISE. Just declare main to throw Exception or whatever.
>
> This seems to be the stylistic nit. ;) There is the symmetry against
> readers code, which wraps the exceptions into the ISE. For my taste, it
> looks better to retain that symmetry.
>
> I can still make the changes to the test, if you insist.
>
> -Aleksey.
>
>
More information about the core-libs-dev
mailing list