• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to tell which thread is which in the debugger?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to tell which thread is which in the debugger?


  • Subject: Re: How to tell which thread is which in the debugger?
  • From: Greg Parker <email@hidden>
  • Date: Thu, 22 Mar 2012 11:09:07 -0700

On Mar 22, 2012, at 11:02 AM, Wade Tregaskis <email@hidden> 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     email@hidden     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >How to tell which thread is which in the debugger? (From: Jens Alfke <email@hidden>)
 >Re: How to tell which thread is which in the debugger? (From: Wade Tregaskis <email@hidden>)

  • Prev by Date: Re: How to tell which thread is which in the debugger?
  • Next by Date: Re: Missing header files/folders?
  • Previous by thread: Re: How to tell which thread is which in the debugger?
  • Next by thread: Disabling NSScrollView elasticity in app plist files.
  • Index(es):
    • Date
    • Thread