You’re using your favorite desktop application when suddenly it freezes. You can’t interact with it and the UI won’t refresh,until all of a sudden everything goes back to normal. Sounds familiar? I’m sure this has happened to you before. What most likely happens in such cases is that the application performs a lengthy operation using the UI thread, which in turn isn’t available to take care of the UI until the operation ends.
To provide a responsive UI experience, potentially lengthy operations should be done asynchronously, on a separate thread.