title: RealmSwift - begin/commit writes
body: <p>In my fitness tracker app, I save current run and invoke reverse geolocation method, that is supposed to get the location name where run took place. </p>
  
  <p>First I write 'latestRun' to realm, then I wait for the reverse geocoding to complete and try to modify 'latestRun' variable</p>
  
  <pre><code>try! realm.write {
          realm.add(latestRun)
      }
  
  if !savedLocations.isEmpty
      {
           ReverseGeocoder.getPlace(latitude: savedLocations[0].latitude, longitude: savedLocations[0].longitude, completionHandler: {
              place in
              realm.beginWrite()
              try! realm.write {
                  latestRun.place = place
  
              }
              try! realm.commitWrite()
  
          })
      }
  </code></pre>
  
  <p>it results with an exception</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception 'RLMException', reason: 'The
    Realm is already in a write transaction'</p>
  </blockquote>
  
  <p>What am I doing wrong? What I found in docs is that <code>beginWrite()</code> and <code>commitWrite()</code> methods should be used in this case.</p>