Re: NSXMLDocument and threads
Re: NSXMLDocument and threads
- Subject: Re: NSXMLDocument and threads
- From: Jeff Johnson <email@hidden>
- Date: Wed, 3 Mar 2010 09:37:07 -0600
On Mar 3, 2010, at 12:56 AM, Jens Alfke wrote:
> On Mar 2, 2010, at 10:18 PM, Jeff Johnson wrote:
>
>> Thus, Apple's documentation gives every reason to believe that it is safe to use NSXMLDocument off the main thread, but libxml's documentation gives every reason to believe that it is not safe.
>
> Treat NSXMLDocument as a black box and follow the docs. It's safe to use on non-main threads. Have you run into actual problems with it?
>
> —Jens
I haven't run into problems yet, but thread bugs are often subtle and difficult to reproduce.
I'm not comfortable with the black box attitude. There are thousands of known bugs in Cocoa. There are also a large number of known inaccuracies and omissions in the documentation. Thus, given what libxml says about thread safety, the fact that Apple's documentation does not warn about using NSXMLDocument on the main thread gives me little assurance, especially since NSXML classes are nowhere mentioned by name in the thread safety summary, unlike many other classes both safe and unsafe.
-Jeff
_______________________________________________
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