Skip to content

Commit f76f050

Browse files
committed
fix: run each cell sequentially
Fix #35. When running all cells in a notebook, run each cell in sequence rather than in parallel.
1 parent b267cea commit f76f050

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/controller.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ export class SQLNotebookController {
2323
this._controller.executeHandler = this._execute.bind(this);
2424
}
2525

26-
private _execute(
26+
private async _execute(
2727
cells: vscode.NotebookCell[],
2828
_notebook: vscode.NotebookDocument,
2929
_controller: vscode.NotebookController
30-
): void {
30+
): Promise<void> {
3131
for (let cell of cells) {
32-
this.doExecution(cell);
32+
// run each cell sequentially, awaiting its completion
33+
await this.doExecution(cell);
3334
}
3435
}
3536

0 commit comments

Comments
 (0)