This PR moves the multiprocessing timeout logic to a separate execute module, along with other related classes. This change simplifies the hid.write module by stripping out multiprocessing details not directly related to writing to the HID interface.
Notes
We've moved the following classes to the new execute module:
ProcessWithResult
ProcessResult
We've moved the HID write timeout logic to a generic execute.with_timeout function
Related https://github.com/tiny-pilot/tinypilot/issues/1026
This PR moves the multiprocessing timeout logic to a separate
execute
module, along with other related classes. This change simplifies thehid.write
module by stripping out multiprocessing details not directly related to writing to the HID interface.Notes
execute
module:ProcessWithResult
ProcessResult
execute.with_timeout
functionhid.write_test.py
toexecute_test.py
Peer testing
You can test this build by running the following command on a device: