[Top][All Lists]

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

bug#34821: discard_input_tty does not discard pending input, resulting i

From: Platon Pronko
Subject: bug#34821: discard_input_tty does not discard pending input, resulting in garbage inserted into the buffer
Date: Sun, 7 Apr 2019 22:06:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3

What do you mean by "run concurrently"?  Emacs is pretty much a single
threaded program, and there's only one Lisp thread running at any
given time, which will execute both calls.

My knowledge of Emacs internals is pretty thin indeed. But since adding 
sleep-for results in reordering of events, I thought that there are at least 
different threads that compete for execution (concurrent, maybe not parallel). 
Also I noticed that for example read_char() calls can block for quite a lot of 
time, while Lisp code continues to run. Perhaps there is one Lisp thread and 
some other background C threads?

You may be right, but my reasoning was that without knowing why
there's a second buffer-switch event sometimes, we will be unable to
devise a good solution.  IOW, I think we need to understand the issue
better before we are ready to discuss a solution.
I agree. I'll look at what causes that second event, I'm quite interested in 
the mechanics of it anyway.

reply via email to

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