On Mar 22, 2012, at 11:02 AM, Wade Tregaskis <wadesli...@mac.com> wrote: > Jens Alfke wrote: >> I was hoping that the ‘name’ property of the NSThread would show up in the >> debugger, since it does display names with some threads. But it doesn’t. >> (Why not?) How can I set a name that will show up in the debugger — do I >> need to use the pthreads API for that? > > You should try pthread_setname_np(). When that was first added (Snow > Leopard?) it was orthogonal to NSThread's naming scheme (which was basically > solely for use in the debugger via `po`). I thought the two had been > reconciled - I filed the bug suggesting as such, back in the day - but > perhaps it didn't happen.
As of Lion, [[NSThread currentThread] setName:@"name"] uses pthread_setname_np(). Calling -[NSThread setName:] on a thread that is not the current thread does not. -- Greg Parker gpar...@apple.com Runtime Wrangler _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com