Quantcast
Channel: Avoiding concurrent structures by manually triggering memory barriers - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Holger for Avoiding concurrent structures by manually triggering...

The thing you are trying to do is called “Premature Optimization”. You don’t have a real performance problem but try to make your entire program very complicated and possibly error prone, without any...

View Article



Answer by Alexey Malev for Avoiding concurrent structures by manually...

Some value is written to volatile variable happens-beforethis value can be read from it. As a consequence, the visibility guarantees you want will be achieved by reading/writing it, so the answer is...

View Article

Answer by Darren Gilroy for Avoiding concurrent structures by manually...

Well, that's still not particularly safe, b/c it depends a lot of the underlying implementation of the HashMultimap. You might take a look at the following blog post for a discussion:...

View Article

Avoiding concurrent structures by manually triggering memory barriers

BackgroundI have a class whose instances are used to collect and publish data (uses Guava's HashMultimap):public class DataCollector { private final SetMultimap<String, String> valueSetsByLabel =...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images