This is due to a missing check in the interruptible sleep function which was not
checking if the delay was negative, then was passed to the
Ion::Timing::usleep function, who only takes signed values
Keyboard interruption used to be checked once every 20000 calls to
micropython_port_vm_hook_loop. However, if costly functions were
executed in between calls to this method, the delay for activating
interruptions would increase.
Now, keyboard interruption is checked after a fixed amount of time has
passed. This way, if the process waits a long time between two calls
to micropython_port_vm_hook_loop, it is still interrupted in a timely
manner.
Change-Id: I37ca3bd4a996fa086078f504340dd857526e356a
- Export micropython_port_should_interrupt and
micropython_port_interruptible_msleep in Emscripten
- Make micropython_port_interruptible_msleep available in a helper