title: Application is hanging when threads are created on location update method
body: <p>//In view did load...</p>
  
  <pre><code>self.locationManager =  [[CLLocationManager alloc] init];
  self.locationManager.delegate = self;
  self.locationManager.distanceFilter = kCLHeadingFilterNone;// kCLHeadingFilterNone;
  self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
  
  
  - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation     *)newLocation fromLocation:(CLLocation *)oldLocation
  {
  if (newLocation.course &gt;= 0)
  {
      [NSThread detachNewThreadSelector:@selector(showAlertsIfNeededThread) toTarget:self withObject:nil];
  
  }
  }
  
  - (void) showAlertsIfNeededThread
  {
  @autoreleasepool
  {
      NSLog(@"Thread started........");
      [NSThread sleepForTimeInterval:3.0];
      //[self showAlertsIfNeeded];
      [self performSelectorOnMainThread:@selector(showAlertsIfNeeded) withObject:nil waitUntilDone:NO];
  }
  }
  </code></pre>
  
  <p>After some executions threads are not executing. App is hanging.
  Can any one help me out.</p>
  
  <p>Thanks in advance.</p>