Skip to content

Commit 0353d06

Browse files
committed
Added execution limit of 10 seconds and yielding control back to browser every 100 ms
1 parent 0ad4ea3 commit 0353d06

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • src/components/InteractivePython

src/components/InteractivePython/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ export default function InteractivePython({ children }) {
9595
return window.Sk.builtinFiles["files"][x];
9696
},
9797
inputfunTakesPrompt: true,
98+
execLimit: 10000, // 10 sec
99+
yieldLimit: 100,
98100
inputfun: (prompt) => {
99101
return new Promise((resolve) => {
100102
resolveInputRef.current = resolve;

0 commit comments

Comments
 (0)