title: Perfoming UI updates in secondary queue
body: <p>I am using the new CoreMotion framework to monitor some of the hardware devices. Here is the typical code to do that:</p>
  
  <pre><code>-(void)startAccelerometer{
  self.motion.accelerometerUpdateInterval = 1/30.0f;
  NSOperationQueue* accelerometerQueue = [[NSOperationQueue alloc] init];
  CMAccelerometerHandler accelerometerHandler = ^(CMAccelerometerData *accelerometerData, NSError *error) {
  
      NSLog(@"Accelerometer realtime values");
      NSLog(@"x=%f", accelerometerData.acceleration.x);
      NSLog(@"y=%f", accelerometerData.acceleration.y);
      NSLog(@"z=%f", accelerometerData.acceleration.z);
      NSLog(@"  ");
  
  };
  [self.motion startAccelerometerUpdatesToQueue:accelerometerQueue withHandler:[[accelerometerHandler copy]autorelease]];
  </code></pre>
  
  <p>}</p>
  
  <p>That works just fine. Now I want to print the values on a UILabel, but since the CoreMotion frameworks has you use blocks, this is not guaranteed to be in the main queue (and in fact isn't for my app). Is it is "wrong" to just run the label's setter on the main queue like this?</p>
  
  <pre><code>-(void)startAccelerometer{
  self.motion.accelerometerUpdateInterval = 1/30.0f;
  NSOperationQueue* accelerometerQueue = [[NSOperationQueue alloc] init];
  CMAccelerometerHandler accelerometerHandler = ^(CMAccelerometerData *accelerometerData, NSError *error) {
      dispatch_async(dispatch_get_main_queue(), ^{
          self.lblAccelerometer.text = [NSString stringWithFormat:@"Accelerometer:\nx = %f\ny = %f\nz = %f",
                                        accelerometerData.acceleration.x,
                                        accelerometerData.acceleration.y,
                                        accelerometerData.acceleration.z];
  
      });
  
  };
  [self.motion startAccelerometerUpdatesToQueue:accelerometerQueue withHandler:[[accelerometerHandler copy]autorelease]];
  </code></pre>
  
  <p>}</p>
  
  <p>It works just fine and I don't really see any reason why this would be frowned upon. Any thoughts on that?</p>