WebsterXC / digidash

CSE442 group project that will consist of Raspberry Pi software development. Our goal is to create a plug-and-play digital dashboard and engine monitoring system.
GNU General Public License v3.0
2 stars 3 forks source link

Switch from Multithreading to Multiprocessing #59

Closed WebsterXC closed 7 years ago

WebsterXC commented 7 years ago

After troubleshooting and reviewing our current code, I'm convinced we're being restricted by Python's global interpreter lock (GIL) combined with my threading implementation.

Switching to multiprocessing will require a lot of extra code, but I feel it may really help our data gathering. Although I/O bound tasks in Python do not use the GIL, the underlying OS does not see our Bluetooth socket as an I/O syscall, and does not release the GIL when pinging the dongle.

WebsterXC commented 7 years ago

Changing our Bluetooth code implementation helped our data gathering speed significantly. This issue is no longer required as it was solved instead by collecting a fixed 64 chars at a time each time a PID is requested, rather than read the return buffer character by character as we had been doing before.