NSOperationQueue creates many threads, as you'd expect, and desire. But when you pause the app and debug it in Xcode, it's unclear which threads belong to one operation queue and which belong to another.
I've tried:
[NSThread currentThread] setName: @"My amazing operation thread"]
but as threads are reused, this just means that many threads get this name and then never lose it. I've tried setting the thread name in -start
and unsetting it in -finish
, but the thread names never show up in the Xcode debugging thread list.
What's a good way of naming threads/operations to make them easier to debug in Xcode?