From: Ardis Lu Date: Fri, 24 Mar 2023 05:46:32 +0000 (-0700) Subject: Implement pausing X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=37b245520ba7d4e6266248592c8aa496a485f5f2;p=4-byte-gen Implement pausing --- 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 */