mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-12-07 06:12:53 +11:00
* Queue user actions instead of refusing them while a job runs Start-WinUtilJob -QueueIfBusy parks the job in $sync.JobQueue under the same lock as the busy test, and Clear-WinUtilActiveJob starts the next one when a job ends, failed or not. A clock button in the top bar lists the running and queued jobs and reorders or cancels the queued ones. Closing the window warns about and discards anything still queued. * Hold the freed job slot for the queue until its head starts Clear-WinUtilActiveJob sets \.JobHandoff while queued work remains, so a new action queues behind the head instead of taking the slot in the gap before the dispatch runs. Closing with only queued work left now prompts, and discarding it closes without a console wait. * Ignore a queued job that repeats work already queued A second click on the same action with the same selection while the slot is busy queued the work again, so it ran several times. Jobs are compared by name and a serialisation of their parameters inside the queue lock. * Shut the queue atomically when a queued-only close is accepted The check that nothing started during the prompt and the shutdown flag, queue clear and handoff reset now happen in one SyncRoot step, so a handoff either wins and the running-job question is asked again, or is refused as WinUtil is closing. The XAML test now checks the queue button's own click handler. * Stop the queue handing out the slot when the running job is stopped on close Answering No to the close question set ForceClose but not the shutdown flag, so the stopped job ending could start a queued one while the window closed. Both close branches now share Stop-WinUtilQueuedWork, which sets the flag, clears the queue and ends any handoff under the lock. * Keep queued operations accessible in a bounded scrolling list * Snapshot the package manager for queued upgrades * Prevent queued work from racing close decisions * Name queued job actions for assistive technology * Preserve repeated queue actions after intervening work --------- Co-authored-by: Chris Titus <contact@christitus.com>