IRNAS / ppk2-api-python

Power Profiling Kit 2 unofficial python api.
http://irnas.eu
GNU General Public License v2.0
145 stars 37 forks source link

Switch the PPK2_MP class to use threading to fix Issue 18. … #21

Closed Mathutor closed 1 year ago

Mathutor commented 1 year ago

The PPK2_MP can now be used on windows and fixes a possible issue with queue sync on Linux platforms

wlgrd commented 1 year ago

Where do you get the possible queue sync issue on Linux? I think if this is not something that occurs for everyone, a switch should be put in place to select which "backend" you want to use; multiprocessing or threading.

Mathutor commented 1 year ago

The threading is also required for Windows to run this library. Running with multiprocessing is problematic as it needs pickle (and copy) the serial object, which isn't the correct thing to do.

wlgrd commented 1 year ago

I see. I cannot test this myself, so will leave it up for someone else to check it out

NejcKle commented 1 year ago

I have tested this on Windows, confirming that threading fixes the issue with pickling.