summaryrefslogtreecommitdiff
path: root/test/shapes.script
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 01:54:09 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commitb1311b3d489a8054456cba7054160ed7fb7e70e1 (patch)
treeb724a13f225f30a9dc6ce8e4b64ec6ffc0ceba32 /test/shapes.script
parentf3591d48a16086dd4b3b081da00804d2541fefcc (diff)
downloadsketchbook-b1311b3d489a8054456cba7054160ed7fb7e70e1.tar.gz
sketchbook-b1311b3d489a8054456cba7054160ed7fb7e70e1.zip
screen.png: one read, answered when its frame has landed
A screenshot over 9P was a write of `screenshot` to ctl, then reads of status until screenshot_generation moved, then a read of screen.png (an open while a capture was pending failed). Now an open of screen.png asks for the next frame itself and is parked (cloud9's Status.again) until the capture lands: the service loop answers the engine's retry() each pass, so a parked open is asked again every frame, and respond (unchanged) answers it once nothing is pending, pinning that frame's PNG, or with the capture's error. So `9p read screen.png` or `fs read screen.png` is the whole recipe. A write of `screenshot` still works and status still counts, and an open after it waits for a frame of its own. The frame-thread loop carries the park cleanly: retry() and next() run on the frame thread between frames like every request, a parked open keeps its fid, a flush or a hangup drops it, and the four parking slots a connection has bound how many wait at once (a fifth open is refused "waiting"). Tests: test-control 46/46 steps, 10/10 tests (the snapshot test's CapturePending is now what answer() parks). Live, headless, the replay fixture: three reads of screen.png with no write, 24-26 ms each with the 9p process's start, 640x360 PNGs; the old write-then-read still works. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/shapes.script')
0 files changed, 0 insertions, 0 deletions