emacs-devel
[Top][All Lists]
Advanced

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

Re: The event handling thread


From: Elias Mårtenson
Subject: Re: The event handling thread
Date: Thu, 22 Dec 2016 11:12:08 +0800

On 22 December 2016 at 01:42, Eli Zaretskii <address@hidden> wrote:

> But that doesn't change the fact that it makes more sense to never allow keyboard input to be processed by
> anything other than the main thread?

Why does it make more sense than, say, serialize access to the
minibuffer such that only one thread can access it at a time?

It would, if the minibuffer was the only place where the keyboard was read. However, isn't this problem wider than just the minibuffer?

In my tests with ‘sit-for’ and threads, I noticed that if multiple threads do ‘sit-for’ at the same time, and a press a key, then only one of the threads gets released. As you keep generating input, more and more of the threads exit the call to ‘sit-for’. A central input processing thread would fix this issue too, right?
 
> C-g isn't "normal" keyboard input, is it?

It depends.  It's a bit of both, at least on GUI frames.

Is this related to the messy event loop in GTK Emacs that people were commenting on in some other thread recently?

reply via email to

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