Add pause-resume-stop functionality and UI

This commit is contained in:
Nilay Majorwar
2021-12-15 21:31:25 +05:30
parent 29b243d6f2
commit 13ff6da638
8 changed files with 262 additions and 31 deletions

View File

@@ -21,10 +21,19 @@ export type WorkerRequestData =
| {
type: "Execute";
params: { interval?: number };
}
| {
type: "Pause";
params?: null;
};
/** Kinds of acknowledgement responses the worker can send */
export type WorkerAckType = "init" | "reset" | "bp-update" | "prepare";
export type WorkerAckType =
| "init" // on initialization
| "reset" // on state reset
| "bp-update" // on updating breakpoints
| "prepare" // on preparing for execution
| "pause"; // on pausing execution
/** Types of responses the worker can send */
export type WorkerResponseData<RS> =