stefnotch / quantum-sheet

QuantumSheet - A user friendly mathematics worksheet and solver
https://stefnotch.github.io/quantum-sheet/
GNU General Public License v3.0
55 stars 5 forks source link

Interrupt Web Worker or Python #5

Open stefnotch opened 4 years ago

stefnotch commented 4 years ago

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

stefnotch commented 3 years ago

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 -- https://github.com/stefnotch/quantum-sheet/issues/17