jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <felix.schumac...@internetallee.de>
Subject Re: Review of HttpMetricsSender, TextGraphiteMetricsSender and PickleGraphiteMetricsSender
Date Thu, 26 Jan 2017 06:31:58 GMT


Am 25. Januar 2017 23:28:48 MEZ schrieb Philippe Mouawad <philippe.mouawad@gmail.com>:
>Hello,
>There was a similar synchro bug in those 3 classes as reported in:
>
>   - https://bz.apache.org/bugzilla/show_bug.cgi?id=60648
>
>CopyOnWriteArrayList does not seem to be a good option.
>
>I fixed them with regular Synchronization but I wonder if there is not
>a
>better way using Java 8.

Would a ConcurrentLinkedQueue fit your need?

Felix

>
>But I am not sure.
>
>I read this:
>
>-
>http://blog.takipi.com/java-8-stampedlocks-vs-readwritelocks-and-synchronized/
>-
>https://docs.oracle.com/javase/8/docs/technotes/guides/concurrency/changes8.html
>
>My intention was to have a thread safe collections (without using
>Collections.synchronized...) and have a method to atomically "drain"
>rows
>from the list in a local variable , this way synchro would not have
>been
>needed.
>
>
>Is there a way through streams to do that  ?
>Sorry for my stupid questions.
>Thanks for help
>Regards

Mime
View raw message