pgyori commented on a change in pull request #4748:
URL: https://github.com/apache/nifi/pull/4748#discussion_r568838143
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-runtime/src/main/java/org/apache/nifi/BootstrapListener.java
##########
@@ -46,6 +46,7 @@
private volatile Listener listener;
private volatile ServerSocket serverSocket;
Review comment:
As far as I know, in the cases above, it actually is the reference that
needs to be volatile since the value of the reference is changed from multiple
threads and we need to make sure that no matter which thread reads the object
behind this reference, it gets to the current object and not an outdated
previous instance.
----------------------------------------------------------------
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:
[email protected]