Re: NSXMLParser thread safe?
Re: NSXMLParser thread safe?
- Subject: Re: NSXMLParser thread safe?
- From: Ken Thomases <email@hidden>
- Date: Thu, 31 May 2012 22:50:38 -0500
On May 31, 2012, at 10:45 PM, Graham Cox wrote:
> Just wondering if anyone knows whether NSXMLParser is thread safe. I'm using it to parse SVG files - when I do it threaded, I get a crash in [NSXMLParser parseData:], unthreaded it works fine.
>
> If I know it should be thread-safe, I can look to see whether anything in the parser's delegate is not thread-safe even though it appears to crash in the NSXMLParser itself. The documentation doesn't say one way or the other.
From the Lion release notes for Foundation:
"NSXMLParser Thread Safety
NSXMLParser is now threadsafe. However, it is not reentrant on a given thread; don't call -parse on an NSXMLParser from within a delegate callback of another NSXMLParser."
Regards,
Ken
_______________________________________________
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