title: iOS: RestKit enqueued manage object operation blocking UI thread
body: <p>I am attempting to load a collection of objects via <code>RestKit</code> and have found that this operation is blocking the main thread. Specifically, this functionality is called when a <code>UIViewController</code> appears in the <code>-(void)viewDidAppear:(BOOL)animated;</code> message. As long as request is loading, the user is unable to interact with the UI, and has to wait until the operation has completed. </p>
  
  <p>How can I instruct RestKit to execute the request asynchronously (I thought it already was) and stop blocking the main thread? </p>
  
  <pre><code>-(void)rtrvArtistsByStudio:(ISStudio *)studio
  {
  NSLog(@"Retrieving Artists for studio %ld", [studio studioID]);
  NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
  
  NSDictionary *params = [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"%ld", [studio studioID]] forKey:@"studioID"];
  
  NSURLRequest *request = [restkit requestWithObject:nil method:RKRequestMethodGET path:@"/restAPI/rtrvArtistsByStudio" parameters:params];
  RKManagedObjectRequestOperation *operation = [restkit managedObjectRequestOperationWithRequest:request managedObjectContext:restkit.managedObjectStore.persistentStoreManagedObjectContext success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
      NSArray *artists = [mappingResult array];
      [studio setArtists:artists];
      [notificationCenter postNotificationName:nStudioLoadedArtists object:studio];
  } failure:^(RKObjectRequestOperation *operation, NSError *error) {
      NSLog(@"Failed to load artists for studio %ld due to %@", [studio studioID], error);
      [notificationCenter postNotificationName:nStudioFailedLoadingArtists object:studio];
  }];
  [restkit enqueueObjectRequestOperation:operation];
  }
  </code></pre>
  
  <p>EDIT:
  I should also note that <code>restkit</code> is a pointer to an instance of <code>RKObjectManager</code>.</p>
  
  <p>RestKit version is 0.20</p>