Subject: bug#58505: 29.0.50; Time out waiting for reply from selection owner

From: Po Lu <[email-masked]>
Date: Fri, 14 Oct 2022 14:23:29 +0800

Jean Louis <[email-masked]> writes:

> There is problem when Emacs runs in separate instance while other
> instance is running:
>
> 1. I launch one instance, and have there heavy process running and
>  processing items. Because instance is fully busy, I launch new
>  instance.

This is a well known problem with our selection code that cannot be
easily fixed.  Process filters get to run while responding to selection
events, and (alongside the first Emacs instance being under high load in
general) can disrupt selection data transfer long enough for the second
instance to time out.

If the first instance is actually completely hung, then in addition
SelectionRequest events will never be read from the keyboard buffer, and
it will never get a chance to process selection requests at all.  I
don't see us ever being able to do anything about that problem.