Brendan Powers
Brendan Powers
Hello, I'm wondering if there's anything I can do to help with this PR? This is pretty important to my use case. Thanks!
I was digging a little deeper on this, and it does seem like there is a way to implement this, although it has limitations. https://pyodide.org/en/stable/usage/keyboard-interrupts.html Basically, we'd use a SharedArrayBuffer...
If you think this is a reasonable approach, I'd be happy to file a PR.
The security constraints for SharedArrayBuffer are pretty restrictive. See here for more detail: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/Planned_changes There is no way to set these headers on Github pages or readthedocs, and they are...
Wow, that's pretty cool, I'm a little surprised that works. I still need this for my use case, so I'll try and see if I can implement it. Given that...
I did a quick implementation, and as long as you have the headers set correctly, it works. It doesn't work on localhost by default though, which I think it should....
Yeah, I'm not sure how to apply it in this context. Python may call out to JS at any time, and await a promise. There's no common code that sits...
I've created a WIP PR #460. I've also created a test case for when an interrupt occurs while python is awaiting a function. I've verified that if that happens, the...
I filed a pyodide issue: https://github.com/pyodide/pyodide/issues/2141
If I understand the PR, I don't think that technique will work in this case. WASM shared threads use SharedArrayBuffers to provide a unified memory space. The PR disables multithreading...