jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject Review of HttpMetricsSender, TextGraphiteMetricsSender and PickleGraphiteMetricsSender
Date Wed, 25 Jan 2017 22:28:48 GMT
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.

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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message