From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Can we go GTK-only? Date: Tue, 01 Nov 2016 17:22:10 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <24db2975-17ca-ad01-20c8-df12071fa89a@dancol.org> <4615E73A-19E2-4B79-9889-D3FA686DDDE6@raeburn.org> <11E61536-1345-4B81-999D-2E17F8B14C62@dancol.org> <6CC38BDB-C5AB-4A52-8A71-7E8F43F0B9B3@raeburn.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1477988555 22678 195.159.176.226 (1 Nov 2016 08:22:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2016 08:22:35 +0000 (UTC) User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Cc: Daniel Colascione , Stefan Monnier , emacs-devel@gnu.org To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 01 09:22:31 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1UKz-00059H-S4 for ged-emacs-devel@m.gmane.org; Tue, 01 Nov 2016 09:22:29 +0100 Original-Received: from localhost ([::1]:40392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1UL1-0004Gy-HW for ged-emacs-devel@m.gmane.org; Tue, 01 Nov 2016 04:22:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1UKs-0004Gf-At for emacs-devel@gnu.org; Tue, 01 Nov 2016 04:22:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1UKo-0001lP-4l for emacs-devel@gnu.org; Tue, 01 Nov 2016 04:22:22 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:61004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1UKn-0001jl-Ma for emacs-devel@gnu.org; Tue, 01 Nov 2016 04:22:18 -0400 Original-Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id B13C0F08EE; Tue, 1 Nov 2016 17:22:10 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <6CC38BDB-C5AB-4A52-8A71-7E8F43F0B9B3@raeburn.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209055 Archived-At: >>>>> On Mon, 31 Oct 2016 04:24:31 -0400, Ken Raeburn = said: >> 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 =E2=80=94 just move *everything* we do from t= he > initial thread to a new thread, and have the initial thread just > wait around doing nothing.) Indeed. Then this is not a serious restriction for attaching a Cocoa GUI terminal with multi-tty. Detaching is easier if the GUI process is separated (as far as I know, the only way for a Cocoa GUI application to disconnect from the window server or Dock on macOS is to terminate the application process), but this has nothing to do with the "main thread restriction". >> 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=E2=80=99t think it=E2=80=99ll b= e 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 anyway? You don't need multiple UI threads. The overall shape wouldn't be much different from the current one for communication with multiple X11 servers. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp