You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Stephan Ewen (JIRA)" <ji...@apache.org> on 2016/02/12 00:53:18 UTC
[jira] [Commented] (FLINK-3392) Unprotected access to elements in
ClosableBlockingQueue#size()
[ https://issues.apache.org/jira/browse/FLINK-3392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143722#comment-15143722 ]
Stephan Ewen commented on FLINK-3392:
-------------------------------------
I don't understand this issue. It is an access of a primitive field (a single atomic operation already), what would the locking change?
> Unprotected access to elements in ClosableBlockingQueue#size()
> --------------------------------------------------------------
>
> Key: FLINK-3392
> URL: https://issues.apache.org/jira/browse/FLINK-3392
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> Here is related code:
> {code}
> public int size() {
> return elements.size();
> }
> {code}
> Access to elements should be protected by lock.lock() / lock.unlock() pair.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)