ios - NSURLSession and Multithreading -


I just want to clarify something, though it is quite simple from what I've read so far in Apple's documentation. When NSURL session comes into play, by default, any task is set to run on separate thread. So when I write

  NSURL session * session = [NSURL session session with session: Representative delegation: self-delegate queue: zero]; [[Session download Task With Request: Request] Resume];  

The downloading process (representative methods, completion operators, EACAC) runs from main one to second queue (i.e. thread). Therefore, there is no need to create a NSOperationQueue for example or put the "resume" call inside the GCD block (like dispatch_async () ) Have given .

Am I properly understood?

Yes, everything runs in the background thread default and you can also see if you want Then at the runtime.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -