emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about throw-on-input


From: Eli Zaretskii
Subject: Re: Questions about throw-on-input
Date: Mon, 11 May 2020 17:13:28 +0300

> From: Alexander Miller <address@hidden>
> Date: Sun, 10 May 2020 15:47:18 +0200
> Cc: address@hidden
> 
> Checking (input-pending-p) does not work in this scenario. When your
> worker thread is actually busy (simulated by the 10000 calls to random
> below) input-pending-p will not return t, no matter how much you hammer
> the keyboard in the meatime. The yield-time message will not appear even
> once. So it looks like keeping the CPU busy also prevents the processing
> of input events.

It is unusual for non-main threads to wait for keyboard input
descriptor.  You shouldn't rely on that because it can only work very
rarely, if at all, and when it does, you are likely to see serious
problems.  Normally, the 'pselect' call issued by a non-main thread
will not mark the keyboard descriptor as being waited for.

At least, that's my understanding of the code and its implications.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]