Re: [OT] Sync vs ASync Server Comms
Re: [OT] Sync vs ASync Server Comms
- Subject: Re: [OT] Sync vs ASync Server Comms
- From: Mike Abdullah <email@hidden>
- Date: Sun, 24 Feb 2013 20:22:07 +0000
On 24 Feb 2013, at 12:26, Dave <email@hidden> wrote:
> Hi All,
>
> On 22 Feb 2013, at 22:23, Jens Alfke wrote:
>
>>
>> On Feb 22, 2013, at 8:32 AM, Dave <email@hidden> wrote:
>>
>>> Of course there are threading "issues"!!!! Having delegates doesn't stop that
>>
>> There are no threading issues if you don’t create background threads. I’ve written a lot of code that does network access using the async APIs, and most of it didn’t require me to create any background threads. Since all my code runs on the main thread, I don’t have any threading issues. That’s one less huge thing to worry about in my app.
>
> I think I see what you mean, but I'd argue that there are still "threading" issues, the OS will create the Background Threads and take care of calling you back on the main thread
I think you're missing some of the point: with asynchronous methods, the frameworks don't necessarily spawn off one thread per operation. NSURLConnection internally handles all connections on a single thread, rather than one thread per connection. If you're making anything more than a handful of connections at once, this is quite a win.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden