Re: Hang detection
Re: Hang detection
- Subject: Re: Hang detection
- From: Charlie Dickman <email@hidden>
- Date: Sun, 29 Jul 2012 17:15:43 -0400
The way I would do it, even though it may be old fashioned, would be to define an int (or NSNumber) in each of the operations that could be involved in the hang (race condition) that is assigned a value other than 0 that uniquely represents the operation when it begins and set back to 0 when it ends. Then, in the code that is guaranteed to be executed when the hang occurs, check the values of the flag values to see which are executing at that point. Indication of 2 or more being in execution simultaneously identifies the culprits.
On Jul 29, 2012, at 4:56 PM, John MacMullin wrote:
> My app hangs due to what appears to be two competing operations. Appears because other possible reasons may exist.
>
> How do I snapshot, debug or otherwise detect and obtain a stack trace of the code causing the hang?
>
> Best regards,
>
> John MacMullin
> _______________________________________________
>
> 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
Charlie Dickman
email@hidden
_______________________________________________
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