There are certain situations where an operation causes a small pause in the execution of the program. It might not even take a second to complete, but it is still noticeable to your users because it introduces a momentary pause in the GUI.
In this recipe, we will discuss how to deal with these scenarios without needing to process the whole task in a separate thread.