Pygaze wait_for_saccade_end with timeout?
I was wondering if it is possible to use the wait_for_saccade_end() function with a timeout. Specifically, we are using an Eyelink and would like to wait for completed saccade OR until 2000 ms have passed.
Since wait_for_saccade_end() essentially block the scripts until a saccade has been made, we're having trouble implementing the later.
While I think it should be possible to adapt the pygaze version of the saccade detection to add a timeout parameter, the 'native' functionality that is called for Eyelink seems a lot harder to adapt.
So I was hoping someone else has tackled this problem before.
One workaround I am currently considering / testing, but seems quite crude is to run wait_for_saccade_end() in a new thread using the threading module, and adding a trace so the thread can be killed if needed (https://www.geeksforgeeks.org/python-different-ways-to-kill-a-thread/)