Re: Network Reachability APIs
Re: Network Reachability APIs
- Subject: Re: Network Reachability APIs
- From: Eric Hermanson <email@hidden>
- Date: Wed, 20 May 2009 17:27:07 -0400
Fair enough. My application is so network intensive that I really
don't have the luxury of having a bad network connection in the first
place. If we want to talk APIs, I wish Apple would provide Cocoa APIs
for things like socket timeout and reconnecting a socket that may have
lost its connection for some reason.
- Eric
On May 20, 2009, at 5:12 PM, Kyle Sluder wrote:
On Wed, May 20, 2009 at 4:56 PM, Eric Hermanson <email@hidden>
wrote:
I'm not so sure it's poppycock. The asynchronous IO APIs all do
the work in
a background thread (or a 'simulated' background via a run loop).
Either
way the IO is not blocking the main application thread when it is
working.
So I don't think the concept that correct IO is IO that is done in
the
background is at all 'poppycock'.
There is nothing incorrect about performing IO on the main thread.
You specifically said, "if you do IO correctly you'll do it in a
background thread anyway." And there's nothing about a run loop that
simulated multithreadedness. Threads are not the be-all end-all of
computational models.
The reachability API functions a lot like a non-blocking monitor.
It's very useful because it's code I don't have to write that tells me
when I have a good shot of succeeding at something.
--Kyle Sluder
_______________________________________________
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