Getting thread id of current method call

Alexi Groove picture Alexi Groove · Oct 24, 2009 · Viewed 57.1k times · Source

Is there a way to print out the current thread id on which the current method is executing on?

(objective-c please)

Answer

nall picture nall · Oct 24, 2009
NSLog(@"%@", [NSThread currentThread]);