Goroutines are a very powerful tool for running concurrent operations and background tasks, especially if they're short-running. As we move more application logic and data handling to background processes, we need to add appropriate safeguards to ensure that errors are handled and that the user interface is kept up to date.
Concurrency, threads, and GUI updates
Managing long-running processes
A goroutine is typically created so that code flow continues while another task completes in the background. If these tasks start to be used for application-critical tasks or to handle important data, especially if these tasks could take a long time, we need to manage them more carefully. The main consideration is how to shut...