rainerjung commented on issue #145: Adding volatile keywords to member variables URL: https://github.com/apache/tomcat/pull/145#issuecomment-470482121 My understanding always was, that reordering must obey as-if-serial semantics for any single thread. The complexity only kicks in when checking, whether effects of statements run by one thread are visible by another. The concrete example you discuss IMHO does not have any visibility problems, because the changes are inside a synchronized block. Changes done by thread T1 while holding any lock are visible by any other thread T2 provided that T1 releases the lock after the changes and T2 acquired it before accessing the changed data.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org