In Windows, it is possible to set the threadname via this code. The threadname is then shown in debuggers.
In MacOSX, I have seen several hints which indicates that
Which version of Xcode are you using? Thread names are only supported in Mac OS X 10.6 and Xcode 3.2.