Skip to content

Commit

Permalink
Merge pull request #491 from France-ioi/quickpi-physical-card
Browse files Browse the repository at this point in the history
Define isRunning because Quickpi uses runner.isRunning to tell if we …
  • Loading branch information
SebastienTainon authored May 22, 2024
2 parents ed89550 + 89cf9c1 commit b8ea98e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion frontend/stepper/abstract_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export default abstract class AbstractRunner {
}

public isRunning(): boolean {
// TODO: implement this if necessary
return false;
}

Expand Down
4 changes: 4 additions & 0 deletions frontend/stepper/js/blockly_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,4 +699,8 @@ export default class BlocklyRunner extends AbstractRunner {
log.getLogger('multithread').debug('[multithread] change current thread', stack);
this.interpreters[0].stateStack = stack;
}

public isRunning(): boolean {
return this.isRunningInterpreter[0];
}
}
4 changes: 4 additions & 0 deletions frontend/stepper/python/python_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,10 @@ export default class PythonRunner extends AbstractRunner {
return origValue;
}

public isRunning(): boolean {
return this._isRunning;
}

stop() {
for (let i = 0; i < this._timeouts.length; i += 1) {
window.clearTimeout(this._timeouts[i]);
Expand Down

0 comments on commit b8ea98e

Please sign in to comment.