Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source Swift Library For Easily Tracking Blocking Of The Main Thread

  •  
  •  
  •  
  •  
  •  

Sometimes it can be difficult to diagnose what is causing poor app performance and here’s a handy open source library from Wojtek Lukaszuk called Watchdog that allows you to log blocking on the main loop.

Watchdog allows you to specify an amount of time that the main thread needs to be blocked for then automatically generates a log statement if the thread is blocked for that amount of time.

This example from the readme shows how to use watchdog with a 0.2 second interval:

let watchdog = Watchdog(0.2)

You can find Watchdog on Github here.

A nice library for finding out if the main thread is being blocked.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments