title: Is there any difference between dataWithContentsOfURL (threaded) and dataTaskWithURL?
body: <p>We're using dataWithContentsOfURL because it is, uh, simple...</p>
  
  <pre><code>NSData *datRaw = [NSData dataWithContentsOfURL:ur];
  </code></pre>
  
  <p>Now, of course, that will hang the main UI thread.</p>
  
  <p>So we put it on another thread.  We do that exactly thus,</p>
  
  <pre><code>-(void)performSearch:(NSString *)stuff then:(void(^)(void))after
   {
    dispatch_queue_t otherThread =dispatch_queue_create(nil,0);
    dispatch_queue_t mainThread =dispatch_get_main_queue();
    dispatch_async(otherThread,
      ^{
      self.resultsRA = [self ... calls dataWithContentsOfURL ...];
  
      dispatch_async(mainThread, ^{  if (after) after(); });
      });
   }
  </code></pre>
  
  <p>(Incidentally, here's an excellent introduction to that if needed <a href="https://stackoverflow.com/a/7291056/294884">https://stackoverflow.com/a/7291056/294884</a>).</p>
  
  <p>Well now, Apple says you <strong>should not use</strong> dataWithContentsOfURL, they say <strong>you should instead</strong> just use NSSession. So, <code>dataTaskWithURL:completionHandler:</code></p>
  
  <p>My question, is there any difference at all between making our own thread (i.e. with dataWithContentsOfURL) versus using dataTask ?</p>
  
  <p>Are we wrong to use dataWithContentsOfURL: on a thread, for some reason? I appreciate it is more convenient, etc.  I mean is there are real difference, any dangers, etc.</p>