[
https://issues.apache.org/jira/browse/HADOOP-15373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16461097#comment-16461097
]
Daryn Sharp commented on HADOOP-15373:
--------------------------------------
I see no benefit to changing it. The {{AtomicReference}} is internally using a
volatile and the getter/setter will be inlined by the jvm so it's functionally
equivalent. Even though CAS methods aren't currently being used, past
experience is people may be prone to removing a volatile keyword. The atomic
ref is harder to accidentally change and slip through a review.
Unless there's a compelling reason I'm overlooking, please close as not a
problem.
> Clear the code of Callqueuemanager
> ----------------------------------
>
> Key: HADOOP-15373
> URL: https://issues.apache.org/jira/browse/HADOOP-15373
> Project: Hadoop Common
> Issue Type: Bug
> Components: common
> Affects Versions: 3.2.0
> Reporter: maobaolong
> Assignee: maobaolong
> Priority: Minor
>
> The CallQueueManager contain two member, putRef and takeRef. They seems
> shouldn't have to use AtomicReference, it can use the volatile directly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]