Skip to content

This Category adds lag detection that can be used to generate Crashreports when a method blocks the main thread for too long.

Notifications You must be signed in to change notification settings

scriptease/NSThread-LagDetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NSThread-LagDetection

This Category adds lag detection that can be used to generate Crashreports when a method blocks the main thread for too long.

When the main thread timeouts the app will be killed, generating a Crashreport at the current state of the app. Hopefully this crash will point you to a deadlock, wait or sleeping part of the code.

Call the methods early (e.g. in IBActions oder other user events) and before your logic, e.g.:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [NSThread killIfMainThreadIsBlocked];

    [self createAndPushViewController];
 }

About

This Category adds lag detection that can be used to generate Crashreports when a method blocks the main thread for too long.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published