Skip to content

Viewer respects max instances - #855

Merged
SimonCropp merged 2 commits into
mainfrom
viewer-respects-max-instances
Aug 26, 2026
Merged

Viewer respects max instances#855
SimonCropp merged 2 commits into
mainfrom
viewer-respects-max-instances

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

No description provided.

The viewer was exempt from the cap on the grounds that it queues rather
than opening a window per pair. That is true of the second pair and every
one after it, and false of the first: with nothing owning the queue,
AddDiff starts a process. So MaxInstancesToLaunch(0) - "no window opens" -
opened one, and a run with no tray put a viewer on screen per staged
snapshot with nothing available to stop it.

The check goes in ViewerLaunchGate, which is the only place that knows
which of the two is happening, and after the ownership probe. A caller
that asked would charge all twenty of a parallel run's callers for the one
window between them, and the nineteen that find the owner would be capped
out of forwarding their pairs to it.

Capped is its own outcome so AddDiff can report TooManyRunningDiffTools
rather than folding it in with a tool that could not be found.
@SimonCropp SimonCropp added this to the 20.1.1 milestone Aug 26, 2026
@SimonCropp
SimonCropp merged commit 26e79f0 into main Aug 26, 2026
11 checks passed
@SimonCropp
SimonCropp deleted the viewer-respects-max-instances branch August 26, 2026 13:57
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant