Purely out of curiosity:
I’m doing some UNIX dev in XCode 4 GM and I noticed in the console output that process ID’s are being displayed in decimal while thread ID’s are being displayed in hexadecimal.
Example:
[Switching to process 37574 thread 0x0]
Why are these conventions used ?
Thanks,
Scott
Probably because process ids are usually displayed in decimal (Activity Monitor, top, ps, etc.), and thread ids are usually hexadecimal (gdb, various other debugging tools). I suspect the reason for that is, ultimately, so they’re easier to tell apart. (Just remember “2378,0xF4” and you don’t need to remember which is the pid or the tid.)