sagemathinc / cowasm

CoWasm: Collaborative WebAssembly for Servers and Browsers. Built using Zig. Supports Python with extension modules, including numpy.

Home Page:https://cowasm.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support signals... at least SIGINT so you can use control+c to interrupt a running computation

williamstein opened this issue · comments

One example where work is needed is

this.stdinBuffer = this.waitForStdin();

in wasi.ts. The above will wait forever for stdin, but should only wait the specified amount
of time. For Python in python-wasm/packages/cpython/build/wasm/Modules/readline.c it looks like the amount of time is 0.1 seconds... and after that time, there is an explicit call to check for signals. That said, maybe we'll just end the waitForStdin when there is a signal.