-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Epic: Make input and output mode process state instead of global state #4954
Comments
I attempted to dissect our input queue during Hackathon. Here's my notes inside the bufferThings that happen during WRITE
Things that happen during READ
During FLUSH
outside the buffer
ENQUEUED EVENTS
|
The concerns for handling partials are spread across three classes, some of which are already process-local state. If you do a LINE_INPUT and receive multiple lines, there's a chance that partial lines will be saved against your process data. If you do a raw event input and get partials, they're saved globally on the queue. Neither of these are cleared by a FLUSH. Rearchitecting our input records to do translation at READ time instead of WRITE time will be difficult, but will ensure more consistent results (one process can't read half of a VT sequence, the clipboard would be a single event so that two processes couldn't both read half the clipboard data, etc.) and when an event translates to multiple outputs that don't fit they'll be enqueued per-handle. |
Notes:
We should investigate our options here: can we make the input or output mode process state?
If we make the input mode process-local, we need to move to an input model that miniksa and I have discussed: input records are translated (mouse -> vt, input -> vt, clipboard -> key, or clipboard -> vt) for the reader instead of upon insertion into the queue. That's a huge chunk of work.
Making the output mode process-local may have many fewer caveats. We already have some process-local output state like UTF-8 partials.
This'll solve the overarching issue in #4921 and #4949.
The text was updated successfully, but these errors were encountered: