RFR [8038333] java/lang/ref/EarlyTimeout.java failed
Ivan Gerasimov
ivan.gerasimov at oracle.com
Sun Mar 30 09:04:12 UTC 2014
Thank you Mandy for review!
On 30.03.2014 8:20, Mandy Chung wrote:
> On 3/27/2014 6:36 AM, Ivan Gerasimov wrote:
>> Now, I updated the webrev with the additional delay as you suggested:
>> http://cr.openjdk.java.net/~igerasim/8038333/2/webrev/
>
> Thanks for the updated patch, Ivan and also Peter for the suggestion
> to delay to give a chance for the threads to wait on the lock.
>
> Ivan - I agree with you that there is no guarantee that one thread can
> remove the reference before the timeout. With this patch, basically
> the test can only verify that the remove(timeout) must be >= timeout
> if no reference is in the queue. That makes the test less
> interesting but it's a tradeoff with test stability. I wonder if
> running this test in othervm would help increase the chance of
> enqueuing the reference after System.gc.
>
> I think it's okay with your proposed patcht. We should revisit this
> test in the future to see how we can improve the test for example
> something similar to what Peter suggests. Can you file a bug for the
> test improvement so that we can look into that in the future?
>
Okey. Will do.
> BTW there is a typo in line 40 s/System.gs()/System.gc()/. It'd be
> good to add a comment in line 66 to make it clear that the main thread
> waits until the threads has started and give it a chance for the
> threads to block on the queue.remove(timeout) call.
>
Yes, I will update the comment as you suggest before pushing.
Sincerely yours,
Ivan
More information about the core-libs-dev
mailing list