feat(queue): a PC can run one game at a time, yours counted (LONGSHOT_QUEUE_ONE_GAME) #2792
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2792
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:fix/queue-game-waits-for-player"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The job queue starts up to 3 games at once (
shared), and only timed runs wait for a game someone is playing: asharedorgpurun starts beside it. A PC that can run one game at a time had no setting for that (LONGSHOT_QUEUE_GPU_SHARED=1still starts a run beside yours)."LONGSHOT_QUEUE_ONE_GAME": "1"in the development folder'sconfig/job_queue.json:shared,gpu,timing,profile) waits while a game runs that no running job started: the one you play, one started outside the queue, or one an ended job left. It keeps its place and holds nobody up meanwhile;Builds go on beside the game, as now. Off by default: nothing changes for a PC that doesn't set it.
Read first:
foreign_gameandaloneinscripts/devtools/jobqueue.py.Testing
Tested: Windows 11, RTX 3080, no game started: a program named
longshot.exe(a copy ofping) open, and a trivial--mode sharedjob queued beside it with the setting on.queue statusgave "a game runs (keeps its place)"; the job started when the program closed, after 14 s.tests/test_job_queue.py,OneGame(5 tests): four of them fail onmain's queue and pass here; the fifth holds builds and the setting off as they were. The file's other two failures on this PC, inside the queue on Windows (test_a_pid_used_again_or_another_namespace_is_not_it,test_a_build_outside_the_queue), fail onmaintoo (#2610).Still to test:
Measurements
Nothing to measure: the queue only, no game or build code. Off,
run()does one more comparison a job; on, a process list every 10 s while a game run waits.Risks
With the setting on, a game left open holds every queued game run until it is closed;
queue statussays so. A game whose environment can't be read (a sandboxed game's inner process) counts for neither side: its outer process does. Another version of the queue on the same PC ignores the setting. Turning it off injob_queue.jsonor a revert is enough.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Not run whole yet: the queue's own test above.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Possibly related, for context:
WIP: feat(queue): a PC can run one game at a time, yours counted (LONGSHOT_QUEUE_ONE_GAME)to feat(queue): a PC can run one game at a time, yours counted (LONGSHOT_QUEUE_ONE_GAME)