On 14 May 2009, at 23:39, Luke the Hiesterman wrote:

Why is it assumed that threads created by NSURLConnection are faster than threads created manually with NSThread?

It isn't.

Mike's point is that the chances of someone who is asking whether or not to use NSThread on a developer mailing list doing a better job of using NSThread than whoever at Apple (or NeXT) wrote NSURLConnection are slim.

Moreover, NSURLConnection's implementation (threading model, for instance) may change over time to better fit with developments to the operating system. I can imagine some changes that might be coming in a future release of OS X, for instance, as I am sure can many others.

Your own NSThread won't benefit from those changes unless you rewrite it.

In any event, I would always prefer a pre-existing asynchronous API to effectively rolling my own (which is what you'd have to do anyway if you were using your own thread). Even if it isn't going to run any faster, it's going to be a damn sight faster to implement than rolling your own, and it's likely to have fewer bugs to boot.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to