Skip to content

Commit 7175a6a

Browse files
authored
Merge pull request #81 from ut-code/pyodide-worker
pyodideをworkerで実行する
2 parents d20552b + 096736a commit 7175a6a

File tree

7 files changed

+406
-254
lines changed

7 files changed

+406
-254
lines changed

app/terminal/python/embedded.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@ export function PythonEmbeddedTerminal({
1212
content: string;
1313
}) {
1414
const initCommands = useMemo(() => splitContents(content), [content]);
15-
const { init, initializing, ready, runPython, checkSyntax, mutex } =
16-
usePyodide();
15+
const {
16+
init,
17+
initializing,
18+
ready,
19+
runPython,
20+
checkSyntax,
21+
mutex,
22+
interrupt,
23+
} = usePyodide();
1724

1825
return (
1926
<ReplTerminal
@@ -29,6 +36,7 @@ export function PythonEmbeddedTerminal({
2936
tabSize={4}
3037
sendCommand={runPython}
3138
checkSyntax={checkSyntax}
39+
interrupt={interrupt}
3240
/>
3341
);
3442
}

app/terminal/python/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ReplTerminal } from "../repl";
66
import { usePyodide } from "./pyodide";
77

88
export default function PythonPage() {
9-
const { init, ready, initializing, runPython, checkSyntax, mutex } =
9+
const { init, ready, initializing, runPython, checkSyntax, mutex, interrupt } =
1010
usePyodide();
1111
return (
1212
<div className="p-4 flex flex-col gap-4">
@@ -23,6 +23,7 @@ export default function PythonPage() {
2323
mutex={mutex}
2424
sendCommand={runPython}
2525
checkSyntax={checkSyntax}
26+
interrupt={interrupt}
2627
/>
2728
<EditorComponent
2829
language="python"

0 commit comments

Comments
 (0)