[Top][All Lists]

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

Re: Can we go GTK-only?

From: Ken Raeburn
Subject: Re: Can we go GTK-only?
Date: Mon, 31 Oct 2016 04:24:31 -0400

> Cocoa (maybe also for GNUstep?) has a restriction that GUI events must
> be processed in the main thread.  Probably the Lisp thread also wants
> to be main, especially when we start it by a tty-only session and then
> add a GUI session via multi-tty.

Nothing comes to my mind that requires that the Lisp thread be the initial 
thread; I would think we could start a new thread for the main Lisp 
interpreter.  (At least in the X11 build, that should be fairly easily 
testable, too — just move *everything* we do from the initial thread to a new 
thread, and have the initial thread just wait around doing nothing.)  But if 
there are toolkits or libraries besides Cocoa that also insist on running in 
the main thread, they may not be able to coexist in use in one process, unless 
we manage the main event loop ourselves, or tell one GUI event handler how to 
recognize when another has activity that we need to mediate some callbacks for.

>  So we have to separate processes for
> GUI front-end and Lisp back-end to support such situations, anyway.

It might not be a bad way to go, if we can keep the interprocess communication 
efficient enough, but I don’t think it’ll be required.  Even if we do that, 
some part of the main Emacs process needs to communicate with these multiple 
GUI processes, so do we wind up with multiple UI threads in the main process 


reply via email to

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