Real time non blocking multi process GUI

PUBLISHED ON OCT 3, 2016 — TECHNICAL

I created a GUI that supports multi-processing to create a better IOT Test Bench. The need for this came up when my initial GUI blocked the serial port as it rendered in real-time, missing chunks of data and generally behaving slowly whenever intensive processing occurred. Later a threaded GUI was used, but that too blocks the serial stream during rendering due to Python’s GIL(in python only one thread can run at once so they are blocking too). An excellent article on threading and the GIL here: http://www.dabeaz.com/python/UnderstandingGIL.pdf

The goal was to have a no issues GUI that could handle fast serial, mathy processing, and heavy rendering simultaneously. Most modern computers(even laptops) have multiple cores but they are not used by the interpreter, so why not use them and solve these problems.

This GUI represents the best of all worlds using multiprocessing whilst rendering complex graphics in real-time. Feel free to modify it for your own uses. Love to hear your thoughts and feedback.

comments powered by Disqus