Thanks Martin!

New webrev:
 http://cr.openjdk.java.net/~shade/8023234/webrev.01/

On 08/20/2013 03:06 AM, Martin Buchholz wrote:
> Thanks.  Looks good.
> 
> Style suggestions for the test:
> 
> +            while(!isDone && !isInterrupted()) {
> SPC after keywords.

Fixed.

> I think it's more readable to use CountDownLatch instead of
> CyclicBarrier for writerHasLock, because of asymmetric API.
> Doers call countDown(), waiters call await().

Nope, we need: a) *reusable* primitive, CDL is one-shot, unfortunately;
b) we need symmetric block, writer should also block on barrier until
both readers arrive; this makes test much more reliable.

-Aleksey.

Reply via email to