emacs-devel
[Top][All Lists]
Advanced

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

The event handling thread (was: Threading IO-bound functions)


From: John Wiegley
Subject: The event handling thread (was: Threading IO-bound functions)
Date: Mon, 19 Dec 2016 09:43:30 -0800
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.90 (darwin)

>>>>> "EM" == Elias Mårtenson <address@hidden> writes:

EM> Now, my thoughts on this is that keyboard entry is an inherently
EM> single-threaded operation *from the user's point of view* and that the
EM> Emacs platform should enforce this. Thus, keyboard input should only be
EM> allowed from the main thread.

I too had thought keyboard events would be managed by an IO queueing thread,
and dispatched to other threads when relevant (i.e., when the receipt of IO
preempted another thread that was "awaiting input").

That is, I never thought event handling would be entirely cooperative, since
the user invoking a command should suspend what Emacs is doing, unless what
Emacs was doing was awaiting input.

Since there's some confusion on this point -- and maybe what I've stated above
doesn't make sense, since it could impose concurrency in places we've not
thought about yet -- I'd like us to discuss this a bit more.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



reply via email to

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