2 ms·
Hey, I'm the primary creator of AFNetworking. - As I understand threading and run loop scheduling, the run loop will spin up as needed when an NSURLConnection
by matttthompson 15y ago
Hey, I'm the primary creator of AFNetworking.
- As I understand threading and run loop scheduling, the run loop will spin up as needed when an NSURLConnection attaches itself to it, and back down again when no more connections are active. The dedicated network thread is there only to manage that run loop.
- Regarding processing queues, like the JSON one, I thought it would be a good idea to isolate that from the global queue; it could always target another queue if needed. Also, unless I'm mistaken, those queues should be concurrent rather than serial.
- As for dispatching to the main thread, this only happens it after all of the work in the operation is done. This just seems like good default behavior. If you wanted to, you could very easily override this by manually setting the `completionBlock` yourself.