From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Multithreading, again and again Date: Wed, 19 Oct 2011 09:18:20 -0600 Message-ID: References: <4E82C377.4040007@yandex.ru> <87vcrne2pv.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319037518 13781 80.91.229.12 (19 Oct 2011 15:18:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2011 15:18:38 +0000 (UTC) Cc: Juri Linkov , Dmitry Antipov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 19 17:18:33 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RGXub-0006CE-CI for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2011 17:18:33 +0200 Original-Received: from localhost ([::1]:38120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGXua-0004C3-Qd for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2011 11:18:32 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGXuU-0004Ac-8U for emacs-devel@gnu.org; Wed, 19 Oct 2011 11:18:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGXuS-00027E-VM for emacs-devel@gnu.org; Wed, 19 Oct 2011 11:18:26 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:8456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGXuS-00026H-JI for emacs-devel@gnu.org; Wed, 19 Oct 2011 11:18:24 -0400 Original-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9JFINCN016147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Oct 2011 11:18:23 -0400 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9JFIM4o012856; Wed, 19 Oct 2011 11:18:22 -0400 Original-Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p9JFIK87028084; Wed, 19 Oct 2011 11:18:21 -0400 X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Mon, 17 Oct 2011 21:18:02 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 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:145339 Archived-At: [ threading ] Stefan> We could provide a `fork' primitive, indeed. My impression is that 'fork' is difficult to implement portably. You could try, I suppose. Or there's "run a separate Emacs and communicate over pipes": http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00534.html There are some aspects of sharing that may be hard (file descriptors). Also setting up initial state of the worker process is hard if one cannot truly fork. I do wonder why there hasn't been more experimentation with this approach, though, given that it is doable today just by running emacs as a subprocess. Tom