title: ConcurrentHashMap returns a weakly consistent iterator, why should we use it anyhow?
body: <p>I am reading the book Java Concurrecny in practice. On page 85 section 5.2.1 it talks about the ConcurrentHashMap and its advantages. However, in one part, the books claims that </p>
  
  <blockquote>
    <p>the iterators returned by ConcurrentHashMap is weakly consistent. This
    means that this iterator can tolerate concurrent  modification,
    traverses elements as they existed when iterator was constructed, and
    may (but not guaranteed to) reflect modifications to the collection
    after the construction of the iterator.</p>
  </blockquote>
  
  <p>From why I understand the whole point of synchronization in concurrent programs is to allow thread accessing a shared resource in a consistent way, where as ConcurrentHashMap is not really fulfilling this. Then why using it at all? </p>