title: Crash while executing fetch request
body: <p>I had a crash while executing executeFetchRequest:error: </p>
  
  <p><code>MyApp[595]</code> has active assertions beyond permitted time: </p>
  
  <pre><code>{(
      &lt;SBProcessAssertion: 0x1e5d1260&gt; identifier: Suspending process: MyApp[595] 
  permittedBackgroundDuration: 10.000000 reason: suspend owner pid:29 preventSuspend
    preventThrottleDownCPU  preventThrottleDownUI
  </code></pre>
  
  <p>And this is my code:</p>
  
  <pre><code>NSString *predString = [NSString stringWithFormat:@"categoryId MATCHES '%@'", categoryId];
  NSPredicate *predicate = [NSPredicate predicateWithFormat:predString];
  [request setPredicate:predicate];
  NSError *error = nil;
  NSArray* objects = [context executeFetchRequest: request error: &amp;error];
  </code></pre>
  
  <p>As far as I understand, the fetch, done synchronously in the main thread, took too much time, more than 10 secs, and the process was suspended. </p>
  
  <p>Browsing in internet I found this nice solution to make the fetch async:</p>
  
  <p><a href="http://blog.zssz.me/2010/01/asynchronous-fetch-in-core-data.html" rel="nofollow">http://blog.zssz.me/2010/01/asynchronous-fetch-in-core-data.html</a></p>
  
  <p>But i am wondering if actually my assumption is correct, and if there are simpler solutions to this problem.
  Thanks a lot.</p>