Manik Surtani wrote:
* Make the concurrent map volatile
* When iterating, first create a new ConcurrentMap and replace the old
one with the new one so all concurrent threads write to the new Map
* Iterate over the old map
That would lead to race conditions since a concurrent writing thread
could write to the "old" map, either by getting a recent yet incorrect
read off the volatile, or reading it right before it changes.
--
Jason T. Greene
JBoss, a division of Red Hat