On Fri, Nov 9, 2018 at 3:33 PM Oleg Kalnichevski <[email protected]> wrote:
> On Fri, 2018-11-09 at 13:42 -0700, Gary Gregory wrote: > > HI All: > > > > Since > > a > > org.apache.hc.core5.http.examples.AsyncReverseProxyExample.ProxyExcha > > ngeState > > is accessed from different threads, I am wondering if some of its > > fields > > are not volatile. > > > > Also, ProxyBuffer subclasses a non-thread-safe class. Is that really > > intentional? > > > > Gary > > Yes, it is. What would be the point if every single method synchronizes > on exchangeState instance? > > > https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/examples/org/apache/hc/core5/http/examples/AsyncReverseProxyExample.java#L275 OK, I can buy that all of the synchronized blocks are correct and schedule thread access to those ivars. But what about the absence of volatile causing threads to miss updates to fields from other threads? Gary > > > Oleg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
