Subject: bug#63865: 29.0.90; call-process while owning the X selection hangs other processes

From: Eli Zaretskii <[email-masked]>
Date: Sat, 03 Jun 2023 20:07:00 +0300

> From: Spencer Baugh <[email-masked]>
> Cc: [email-masked],  Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Sat, 03 Jun 2023 13:03:14 -0400
> 
> Andreas Schwab <[email-masked]> writes:
> > On Jun 03 2023, Spencer Baugh wrote:
> >> Forget other packages: Emacs itself uses call-process in tons of places
> >> where it will run for prolonged periods of time!
> >
> > This has nothing to do with call-process.  Emacs can be busy for many
> > reasons.
> 
> Other things which make Emacs busy still let Emacs respond to X
> selection requests.

Which "other things"?

Andreas is right: anything that the Lisp thread does prevents it from
responding to X selection requests, because while a Lisp program runs,
Emacs checks the input queue only occasionally, as part of maybe_quit
processing.  So when the main thread is busy by doing anything, all
bets are off.