Skip to content

fix(clipboard): avoid sync event backpressure - #44

Merged
sanchxt merged 5 commits into
sanchxt:mainfrom
shideneyu:fix/triple-clipboard-sync
May 25, 2026
Merged

fix(clipboard): avoid sync event backpressure#44
sanchxt merged 5 commits into
sanchxt:mainfrom
shideneyu:fix/triple-clipboard-sync

Conversation

@shideneyu

Copy link
Copy Markdown
Contributor

Summary

Fix clipboard sync instability when multiple devices are connected.

The sync runner was sending status events through a bounded channel using awaited sends. In long-running or multi-device clipboard sync sessions, this could allow the status event channel to apply backpressure
to the actual clipboard sync tasks.

This change makes sync status event delivery non-blocking, so a full status channel can no longer stall clipboard synchronization.

Changes

  • Increase the sync event channel capacity from 32 to 128.
  • Replace blocking .send(...).await calls for sync status events with non-blocking try_send(...).
  • Drop only status/debug events when the channel is full, not clipboard content.

@sanchxt

sanchxt commented May 7, 2026

Copy link
Copy Markdown
Owner

This PR appears to downgrade the workspace version from 0.2.0 on main to 0.1.7 in Cargo.toml/Cargo.lock. Could you please fix that?

@shideneyu
shideneyu force-pushed the fix/triple-clipboard-sync branch from e954429 to c86dad1 Compare May 8, 2026 07:34
@shideneyu

Copy link
Copy Markdown
Contributor Author

Fixed, thanks.

Sorry about the force-push earlier. I should have kept the review history cleaner.

The force-push from e954429 to c86dad1 only reverts the accidental version downgrade:

  • Cargo.toml: restored workspace version to 0.2.0
  • Cargo.lock: restored yoop and yoop-core to 0.2.0

The clipboard backpressure change itself is unchanged.

@sanchxt
sanchxt merged commit 274117d into sanchxt:main May 25, 2026
11 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.

2 participants