OneSizeFitsQuorum commented on code in PR #3010:
URL: https://github.com/apache/thrift/pull/3010#discussion_r1697781111
##########
lib/java/src/main/java/org/apache/thrift/server/AbstractNonblockingServer.java:
##########
@@ -302,6 +302,14 @@ public FrameBuffer(
}
}
+ /**
+ * Sets the selection key.
+ * @param selectionKey the new key to set.
+ */
+ public void setSelectionKey(SelectionKey selectionKey) {
Review Comment:
I checked this part of the code, and in the current Reactor architecture,
all the operations of the selector thread will only happen in the current
thread, Inspecting the code shows that only the selector thread processes the
selectionKey_ in the frameBuffer and reads and writes to transport, so there
are no read or write requests in progress when rebuilding and no visibility
issues (you don't need to change SelectionKey to AtomicReference when you strip
it of final)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]