From 37b245520ba7d4e6266248592c8aa496a485f5f2 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Thu, 23 Mar 2023 22:46:32 -0700 Subject: [PATCH] Implement pausing --- index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index e41690f..4fc714e 100644 --- a/index.html +++ b/index.html @@ -366,6 +366,7 @@ } startAll.disabled = false; + pauseAll.disabled = false; outputContainer.style.display = 'block'; status.textContent = 'Press the "START ALL" button to begin finding optimized function names for all functions, or press "START" on individual functions.'; } @@ -415,7 +416,11 @@ } function handlePauseAll(e) { - + for (const row of state.values()) { + row.worker.terminate(); + row.status = 'Paused'; + } + updateUi(state); } /* Wire up the UI to the business logic */ -- 2.47.3