r-wasm / quarto-live

WebAssembly powered code blocks and exercises for both the R and Python languages in Quarto documents
https://r-wasm.github.io/quarto-live/
MIT License
128 stars 9 forks source link

timelimit doesn't work with pyodide #72

Open NFontrodona opened 1 week ago

NFontrodona commented 1 week ago

When creating an exercise, putting #| timelimit: 3 doesn't have any effect, the code still runs forever.

Example

#| exercise: ex_1_py
#| timelimit: 3
while True:
  a = 1

The code runs forever

georgestagg commented 1 week ago

Thanks for reporting!

Working under webR but not under Pyodide. Looks like we just need to add the interruption logic.