My simple Python app uses PyQt4 for its GUI and clicking a QPushButton causes the app to send a message via serial. GUI elements also update frequently.
Question: I did not know how to implement multithreading. Will not having multithreaded process cause the app to be less responsive and less consistent in sending the serial communication especially when a GUI element will be updated at the same time the serial message is being sent?
That depends. Your PC is idle 99.9995% of the time while you type; so it has a lot of CPU power to spend on background tasks. Most people don't notice this since the virus scanner typically eats 5-20% of the performance. But typing or clicking a button barely registers in the CPU load.
OTOH, if you run a long task in the UI thread, then the UI locks up until the task is finished. So from a user perspective, the UI will be blocking while for the serial port, the world will be OK. Overall, this will be faster but it will feel sluggish.
Multithreading is generally slower than doing everything in a single thread due to synchronization or locking. But a single thread doesn't scale. Eventually, you hit a brick wall (performance wise) and no trick will make that single thread execute faster.
Is Multi-threading required for PyQt4 and Writing to Serial