TerminalRenderPublisher
Triple-buffered render cache publisher.
One buffer is writer-owned (back). One buffer is UI-readable (front). One buffer is spare (recycled after front is replaced).
Writer and UI never touch the same buffer simultaneously when UI consumers access the front buffer through readCurrent.
Parameters
columns
initial cache width in cells.
rows
initial cache height in rows.
Functions
Link copied to clipboard
Returns the latest published snapshot without acquiring a reader lease.
Link copied to clipboard
Reads the latest published front buffer while preventing it from being recycled as a writer-owned back buffer.
Link copied to clipboard
Called from render worker thread only. Reads from reader, updates back buffer, publishes as new front.
Called from render worker thread only.