[
https://issues.apache.org/jira/browse/FLINK-14650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969242#comment-16969242
]
Seth Wiesman commented on FLINK-14650:
--------------------------------------
The example is thread safe. The call to StreamExecutionEnvironment#execute is
blocking. So while there are multiple parallel writers they all complete before
the read.
> Thread safety issue in the piece of code example of dev/stream/testing
> document
> -------------------------------------------------------------------------------
>
> Key: FLINK-14650
> URL: https://issues.apache.org/jira/browse/FLINK-14650
> Project: Flink
> Issue Type: Improvement
> Components: Documentation
> Reporter: Zhenghua Gao
> Priority: Trivial
>
> As mentioned by Gilles in user ML[1], the piece of code example has thread
> safety issue.
> One possibility is use Collections.synchronizedList() to create a
> thread-safety list and remove the synchronized keyword.
> [1]
> [http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Documentation-issue-maybe-td30929.html]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)