• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSXMLParser in background thread crashing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSXMLParser in background thread crashing


  • Subject: Re: NSXMLParser in background thread crashing
  • From: "Philip Q" <email@hidden>
  • Date: Fri, 23 Feb 2007 18:16:30 +1300

On 23/02/07, Jim Correia <email@hidden> wrote:
On Feb 22, 2007, at 9:36 AM, Justin R. Miller wrote:

> 2) There is something related to threading that is causing this.

I don't see it mentioned in the class doc for NSXMLParser, or in the
Cocoa Thread Safety docs, that NSXMLParser is thread safe.

Absent any reference that it is (which I may have missed), you cannot
assume that it can be safely used anywhere but on the main thread.

This isn't what thread safety means -- a thread safe class can be used from multiple threads without using locks. Large parts of Foundation/AppKit aren't thread safe, but are safe for using within a single thread.

There shouldn't be any problem with using an NSXMLParser in a separate
thread. What is a bit suspicious, is the NSAutoreleaePool being added
to -parse. Why is it being added?

-Phil
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: NSXMLParser in background thread crashing
      • From: Jim Correia <email@hidden>
    • Re: NSXMLParser in background thread crashing
      • From: "Justin R. Miller" <email@hidden>
References: 
 >NSXMLParser in background thread crashing (From: "Justin R. Miller" <email@hidden>)
 >Re: NSXMLParser in background thread crashing (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: Core Data bound to NSPopUpButton
  • Next by Date: Re: how to add ssl support in my cocoa application
  • Previous by thread: Re: NSXMLParser in background thread crashing
  • Next by thread: Re: NSXMLParser in background thread crashing
  • Index(es):
    • Date
    • Thread