mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 14:41:52 +00:00
On the core Wayland clipboard, a read waited for the app that copied to close its pipe, and a send wrote until the app that pastes took all of the data. An app that left its pipe open and stopped held the one read worker, so later pastes failed at once, or held one of the eight send threads until it closed its end. Reads and sends now use the pipe nonblocking and wait for it with poll. When no byte moves for 2 s (VectorCraft's own limit, the existing text wait) the read fails without pasting partial data and the send stops; both close their pipe. The wait starts again after each byte that moves, so a large transfer that keeps going is not cut short.