• 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: Thread ID in crash log
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread ID in crash log


  • Subject: Re: Thread ID in crash log
  • From: Greg Parker <email@hidden>
  • Date: Wed, 17 Dec 2008 20:11:36 -0800

On Dec 17, 2008, at 8:03 PM, Dave Dribin wrote:
On Dec 17, 2008, at 7:37 PM, radj wrote:
I see. I'm not trying to be ungrateful (because I really am, thanks for the
code), but calling CrashLogThreadID(pthread_t) might be too costly for every
call to my custom debugLog(...) because there are alot all over the code
(not the best practice, me thinks). But thanks to your intro to
task_threads(), I can follow the idea and try my own array of threads. This
gives me something to start on! Appreciate it. =)

You could cache the thread ID in the pthread context or NSThread dictionary.

Of course, if the number of threads changes then that cached thread ID may not match the crash log anymore. (And the number of threads in your process may change due to code outside your control.)



-- 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


  • Follow-Ups:
    • Re: Thread ID in crash log
      • From: Dave Dribin <email@hidden>
References: 
 >Thread ID in crash log (From: radj <email@hidden>)
 >Re: Thread ID in crash log (From: Darren Adkinson <email@hidden>)
 >Re: Thread ID in crash log (From: radj <email@hidden>)
 >Re: Thread ID in crash log (From: Greg Parker <email@hidden>)
 >Re: Thread ID in crash log (From: radj <email@hidden>)
 >Re: Thread ID in crash log (From: Dave Dribin <email@hidden>)

  • Prev by Date: Re: NSTimer help
  • Next by Date: Re: Thread ID in crash log
  • Previous by thread: Re: Thread ID in crash log
  • Next by thread: Re: Thread ID in crash log
  • Index(es):
    • Date
    • Thread