From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Should this package be included into the NS port? Date: Thu, 24 May 2018 19:37:41 +0300 Message-ID: <83h8mxau22.fsf@gnu.org> References: <20180515183631.GB27909@breton.holly.idiocy.org> <20180518193632.GA31241@breton.holly.idiocy.org> <20180519103329.GB31853@breton.holly.idiocy.org> <83k1rucs15.fsf@gnu.org> <20180523212129.GB36578@breton.holly.idiocy.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1527179745 29765 195.159.176.226 (24 May 2018 16:35:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 May 2018 16:35:45 +0000 (UTC) Cc: nick@tenpoint.co.nz, georgedp@orbitalimpact.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 24 18:35:40 2018 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 1fLtDI-0007eL-72 for ged-emacs-devel@m.gmane.org; Thu, 24 May 2018 18:35:40 +0200 Original-Received: from localhost ([::1]:39750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLtFP-0006DT-7h for ged-emacs-devel@m.gmane.org; Thu, 24 May 2018 12:37:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLtFE-0006Bi-M8 for emacs-devel@gnu.org; Thu, 24 May 2018 12:37:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLtFD-0000l9-Rd for emacs-devel@gnu.org; Thu, 24 May 2018 12:37:40 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLtF6-0000gM-1V; Thu, 24 May 2018 12:37:32 -0400 Original-Received: from [176.228.60.248] (port=3951 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fLtF5-0004eT-EV; Thu, 24 May 2018 12:37:31 -0400 In-reply-to: <20180523212129.GB36578@breton.holly.idiocy.org> (message from Alan Third on Wed, 23 May 2018 22:21:29 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:225659 Archived-At: > Date: Wed, 23 May 2018 22:21:29 +0100 > From: Alan Third > Cc: Nick Helm , emacs-devel@gnu.org, > georgedp@orbitalimpact.com, monnier@iro.umontreal.ca > > The main problem I have is things coming in the opposite direction. I > don’t know if W32 is the same, but we can only run GUI related code in > the main thread. What do you mean by "GUI code" here? > If we separate the Lisp thread and the NS run loop thread, then code > called from Lisp can’t directly interact with the NS GUI code, it > has to be dispatched to the NS run loop thread. The w32 build has a similar problem, and it solves it by setting up message queue between the main and the input threads. Messages are sent between the two threads when needed, and the Windows native messages are used in the opposite direction. So when one thread needs something done by the other thread, it sends the appropriate message, waits for a response, then continues (and sometimes it doesn't have to wait for any response, it depends on the case). Can NS use some similar machinery?