title: Are Swift variables atomic?
body: <p>In Objective-C you have a distinction between atomic and nonatomic properties:</p>
  
  <pre><code>@property (nonatomic, strong) NSObject *nonatomicObject;
  @property (atomic, strong) NSObject *atomicObject;
  </code></pre>
  
  <p>From my understanding you can read and write properties defined as atomic from multiple threads safely, while writing and accessing nonatomic properties or ivars from multiple threads at the same time can result in undefined behavior, including bad access errors.</p>
  
  <p>So if you have a variable like this in Swift:</p>
  
  <pre><code>var object: NSObject
  </code></pre>
  
  <p>Can I read and write to this variable in parallel safely? (Without considering the actual meaning of doing this).</p>