RFR [14] 8217606: LdapContext#reconnect always opens a new connection

Roger Riggs Roger.Riggs at oracle.com
Wed Aug 7 17:49:04 UTC 2019

Hi Pavel,

You are correct, state is volatile.

It seemed unnecessary/redundant since except for isRunning it is updated 
inside a synchronize(lock).
The synchronized(socketList) is also unnecessary since it is already 
synchronized on lock.


On 8/7/19 1:18 PM, Pavel Rappo wrote:
> Roger, thank you for looking at this. While we might hear (on some of your
> questions) from Chris soon, I just have to ask about this one
>> On 7 Aug 2019, at 16:52, Roger Riggs <Roger.Riggs at oracle.com> wrote:
>> 238: isRunning should be synchronized(lock) to make sure each Thread sees the same value threads that update it in start() and close()
> What makes you think they can see something different? Even though the result of
> this call is immediately outdated, the changes to the state made by start/close
> should be propagated as per JMM.

More information about the core-libs-dev mailing list