From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Jan_Dj=C3=A4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs on OS X development Date: Wed, 25 Jul 2012 09:38:47 +0200 Message-ID: <336623D7-ED08-4D23-909F-8DBDC6A7712D@swipnet.se> References: <87r4s68rr4.fsf@lifelogs.com> <83A41E83-79C8-4490-966B-CD224041E840@gmail.com> <80ACEDD7-86B4-4E7D-85F2-4308AB34837B@swipnet.se> <88766C51-C0DC-4307-95A7-A3A9B53B9CAF@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1343201952 22519 80.91.229.3 (25 Jul 2012 07:39:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2012 07:39:12 +0000 (UTC) Cc: Paul Michael Reilly , John Wiegley , "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 25 09:39:11 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1StwBb-0000JM-Lr for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2012 09:39:11 +0200 Original-Received: from localhost ([::1]:48627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StwBa-0001DX-Ey for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2012 03:39:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StwBU-0001DJ-Kv for emacs-devel@gnu.org; Wed, 25 Jul 2012 03:39:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StwBQ-0006O5-H6 for emacs-devel@gnu.org; Wed, 25 Jul 2012 03:39:04 -0400 Original-Received: from mailout.melmac.se ([62.20.26.67]:40018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StwBQ-0006O0-9x for emacs-devel@gnu.org; Wed, 25 Jul 2012 03:39:00 -0400 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id C68B29E59 for ; Wed, 25 Jul 2012 09:38:57 +0200 (CEST) Original-Received: (qmail 24319 invoked by uid 89); 25 Jul 2012 07:38:49 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 25 Jul 2012 07:38:49 -0000 Original-Received: from [172.16.2.211] (gw01.ismobile.com [212.73.186.202]) by coolsville.localdomain (Postfix) with ESMTPSA id 0B04B7FA06C; Wed, 25 Jul 2012 09:38:51 +0200 (CEST) In-Reply-To: X-Mailer: iPhone Mail (9B206) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 62.20.26.67 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151874 Archived-At: Hello. 24 jul 2012 kl. 11:01 skrev Stefan Monnier : >> I have a plan to do more or less what Gdk does on OSX, use lower level (C= ore >> Foundation) API:s. The NS-port has many special things (resizing, redrawi= ng >> and more) that depends on how things are done now, so it isn't >> just a replacement of a few functions. >> I haven't looked at the Mac port, but if it uses CF for the event loop, c= ode >> may be reused from there. >> The basic concept is to have one thread for file descriptors and let the >> main thread deal with Cocoa events. The code today does something simila= r, >> but it relies on polling each 0.1 second. >=20 > Could you add this discussion to etc/TODO, adding as much detail as you > (and others) can about how it works now and how it could be changed? I will do that within couple of days.=20 > BTW, why not use the main thread for file-descriptors? When Emacs isn't talking to subprocesses or the network there are no file de= scriptors. In that case we can manage with just the normal NS event loop and= we do not need to communicate with another thread. I think this is a very c= ommon case (that is, it is how I use Emacs most of the time :-).=20 Also, the NS event loop is already setup in the main thread, it requires som= e setup in other threads. Communicate the data and result for a select call between threads is much ea= sier than handling events between threads. Jan D.=20=