In this chapter, we will extend the functionality of our Python GUI using threads, queues, and network connections.
A tkinter GUI is a single-threaded application. Every function that involves sleep or wait time has to be called in a separate thread; otherwise, the tkinter GUI freezes.
When we run our Python GUI, in Windows Task Manager, we can see that a new python.exe process has been launched. When we give our Python GUI a .pyw extension, then the process created will be python.pyw, which can be seen in Task Manager as well.
When a process is created, the process automatically creates a main thread to run our application. This is called a single-threaded application.
Single-threaded processes contain the execution of instructions in a single sequence. In other words, one command is processed at a time.
For our Python GUI, a single-threaded application...