Skip to content
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

fix(plugins): synchronize event batch handling #3367

Merged
merged 3 commits into from
May 22, 2024
Merged

Conversation

imsnif
Copy link
Member

@imsnif imsnif commented May 22, 2024

This fixes an occasional issue with plugins, where batched events (eg. keypresses coming from a single paste command) would arrive in the plugin out of order.

This is fixed here by synchronizing these batches (sending them to the plugin(s) through a single async task rather than one task per event).

This can theoretically be optimized by paralleling the handling on a client level (i.e. that the same event would be sent to all clients in parallel, moving on to the next event once all clients handled it), but I think it's best to only consider this optimization if it becomes an issue (as is it's pretty fast and a rare occurrence).

@imsnif imsnif merged commit fda5ab1 into main May 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant