title: Is it safe to access (not modify) a Swift Dictionary from multiple threads?
body: <p>I'm quite certain it's not safe to <em>modify</em> a Swift <code>Dictionary</code> from multiple threads, but is it safe to access one? I'm using <code>pthread_rwlock</code> to create a lock allowing a single writer and multiple readers to protect a <code>Dictionary</code>. I've had no problems so far, but I've also been unable to find any information one whether it is safe to do so.</p>
  
  <p>Here's what I mean by "access" a dictionary:</p>
  
  <pre><code>let value = dictionary[key]
  </code></pre>
  
  <p>Here's what I mean by "modify" a dictionary:</p>
  
  <pre><code>dictionary[key] = value
  </code></pre>