[NSThread isMainThread] is probably not what you want!
Conversation
3
2
7
does it have the semantics of running on the main thread though? Will calling UI state behave appropriately?
1
2
yeah, because it's the same queue (so access to resources is still serial)
1
3
not necessarily true - even if it runs serially w.r.t. main thread, there's main thread state.
1
Do you mean there could be thread-local storage associated with the main thread? Yes, but That’s Bad™.
2
Yes and that's how lots of the UI stuff works (e.g., [NSGraphicsContext currentContext]).
1
1
I would imagine that UIKit is smart/new enough to use queue-specific data instead. /cc
2
1
Replying to




