The below is an off-site archive of all tweets posted by @mjtsai ever

August 22nd, 2014

@boredzo Thanks for clarifying. That makes my life much easier, like it was a few hours ago. :-)

via Tweetbot for Mac in reply to boredzo

@boredzo If there were per-thread state, I could not use separate queues per document. But it's moot since you say documents are fine.

via Tweetbot for Mac in reply to boredzo

@boredzo I'm thinking of the NSXMLDocument case where I'm dispatching multiple blocks per document on the same serial queue.

via Tweetbot for Mac in reply to boredzo

@boredzo You can't ensure that they won't be interleaved on the same thread. But it's OK, I guess, since not called from a callback.

via Tweetbot for Mac in reply to boredzo

@boredzo In that case, it is easy to confine two objects to separate threads. But if you confine to separate serial queues…

via Tweetbot for Mac in reply to boredzo

@boredzo I was thinking of long-lived objects (e.g. documents) that you call methods on.

via Tweetbot for Mac in reply to boredzo

@boredzo 10.8 RN only mention a problem with reentrancy. Implies that separate parsers/documents are OK if called from same parent method.

via Tweetbot for Mac in reply to boredzo

@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?

via Tweetbot for Mac in reply to boredzo

@boredzo BTW, that contradicts the docs: "…NSXMLParser is a thread-safe class as long as any given instance is only used in one thread."

via Tweetbot for Mac in reply to boredzo

@boredzo So all bets are off if you're using GCD and don't know the actual thread? Is NSXMLDocument safe?

via Tweetbot for Mac in reply to boredzo