RFR for JDK-8027212: java/nio/channels/Selector/SelectAfterRead.java fails intermittently
yiming.wang at oracle.com
Thu Dec 12 23:33:13 PST 2013
I'm OK with your changes, it look much simpler than the old way to sync
up multiple threads.
On 2013/12/12 0:38, Chris Hegarty wrote:
> The elimination of Threads here is very nice ( I see not reason for
> them ). The tests are much more readable, and clearly the underlying
> race is no longer an issue.
> I would be happy to be listed as a reviewer for this change.
> On 11/12/13 16:16, Alan Bateman wrote:
>> On 10/12/2013 08:46, Eric Wang wrote:
>>> Hi Alan,
>>> Sorry for late, I just got the internal agreement of the fix, the new
>>> version is to use CyclicBarrier to solve unclosed socket issue and
>>> sync-up client and server. Please review.
>> Thanks for working on this. One thing is that creating the ByteServer
>> with a CyclicBarrier looks a bit odd Also the savedException is a bit
>> odd too as I don't think it is ever set.
>> I think these tests could be a bit simpler by just observing that the
>> conditions for the issues don't require the ByteServer to be running in
>> another thread. What would you think about just changing ByteServer to
>> run synchronously? If so then something like this should do it:
More information about the nio-dev