Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Threading + Map

$
0
0
Just want to make sure about this. If a have a Map object defined like this:

Map<Integer, List<Integer>> map = ...



And 4 threads are working on the map object - each thread works on a different key, filling the corresponding list with random values - then i do not have to synchronize it.
Thanks.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>