PSA: Don't start a second NSXMLParser on the same thread where another NSXMLParser is already running, or you will have a bad time.
@boredzo So the docs have been wrong all these years? Do I always have to use a child thread, to avoid colliding with Cocoa on main thread?
-
-
@mjtsai The docs aren't wrong as such, just incomplete. (The other half is buried in the 10.8 RN.) -
@boredzo 10.8 RN only mention a problem with reentrancy. Implies that separate parsers/documents are OK if called from same parent method. -
@mjtsai That's correct. Parsing is synchronous, so the first parse will finish before the second starts.
-
-
@mjtsai Parsing on the main thread shouldn't be a problem; I know of no case where Cocoa calls you from its own NSXMLParserDelegate.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Petrifying Horror
Michael Tsai