title: How to make MainThread wait till some async action is done?
body: <p>I have <code>UITableView</code> with some content, which is loaded in <strong>asynchronous</strong> way. When user rotates the device I need to make <code>[tableView reloadData]</code> in <code>-willRotateToInterfaceOrientation</code> method. ReloadData works asynchronous in my case. </p>
  
  <p><strong>I understand that reloadData works in main thread, but it fires cellForRowAtIndexPath, which works async in my case.</strong></p>
  
  <p>So the question is how to make main thread wait till <code>UITableView's reloadData</code> ends.</p>