I need to trace some debugging information on the threads in my application, at least the name or maybe even only the count of them. Xcode does it wonderfully (showing the name of the dispatch queue) :
How can I replicate this using any technology? I looked a little bit to NSTread
([NSThread callStackSymbols]
is beautiful, but only for the current thread) and pthread
, pthread_from_mach_thread_np
looks promising. Even an external call to ps
is acceptable if nothing else.