stefnotch/quantum-sheet

Interrupt Web Worker or Python

Opened this issue · 1 comments

When a computation takes very long, it should be possible to stop it. I'd prefer to not have to .terminate() the web worker for that.

Relevant issues

Added the pyodide.setInterruptBuffer API. This can be used to set a SharedArrayBuffer to be the keyboard interupt buffer. If Pyodide is running on a webworker, the main thread can signal to the webworker that it should raise a KeyboardInterrupt by writing to the interrupt buffer
-- #17