From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: Are there plans for a multi-threaded Emacs? Date: Mon, 17 Nov 2003 22:52:41 -0800 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069139402 6150 80.91.224.253 (18 Nov 2003 07:10:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Nov 2003 07:10:02 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Nov 18 08:09:58 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ALzzq-00048Q-00 for ; Tue, 18 Nov 2003 08:09:58 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ALzzq-0003pz-00 for ; Tue, 18 Nov 2003 08:09:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AM0vb-0008KL-QT for emacs-devel@quimby.gnus.org; Tue, 18 Nov 2003 03:09:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AM0uE-0007G3-HK for emacs-devel@gnu.org; Tue, 18 Nov 2003 03:08:14 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AM0tL-0005ox-HA for emacs-devel@gnu.org; Tue, 18 Nov 2003 03:07:50 -0500 Original-Received: from [204.251.10.81] (helo=iris1.directnic.com) by monty-python.gnu.org with smtp (Exim 4.24) id 1AM0tL-0005ns-1k for emacs-devel@gnu.org; Tue, 18 Nov 2003 03:07:19 -0500 Original-Received: by iris1.directnic.com (iris/0.110:492879); 18 Nov 2003 07:05:52 +0000 Original-Received: from adsl-68-124-232-44.dsl.snfc21.pacbell.net (EHLO Majnun.local.newartisans.com) (68.124.232.44) by iris1.directnic.com (iris/0.110:492879/relay) with ESMTP id 492879 for emacs-devel@gnu.org; 18 Nov 2003 06:54:08 +0000 Original-To: emacs-devel@gnu.org In-Reply-To: (David Masterson's message of "17 Nov 2003 14:53:04 -0800") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (darwin) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17877 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17877 David Masterson writes: > If not multi-threading, could Emacs be made stronger in > multi-tasking? For instance, if the display-engine could be > separated from the lisp-engine parts, then perhaps a mini-scheduler > could fork off lisp-engines as needed (or requested) to process > complicated things. The "engines" would theoretically be lighter > weight than Emacs proper, but not as light-weight as multi-threading > would allow. Perhaps multi-threading could be allowed in a rather brain-damaged way, using global-scope critical regions: All current Lisp code would run in a MAIN region, in which only one thread could execute at a time, and each thread would have to give up control to allow any others to run. Then we add (with-critical-region NAME ...), and the ability to create such regions, so that Gnus, for example, could run in its own happy little space, blocking if it ever needed to do things outside of that space (and then grabbing control when the space was available). This at least gives the maintainer a way of creating a world apart that could run in conjunction with the rest of Emacs. Since what I think most people want from threading is the ability to give long- running Emacs modules a chance to do their work while they continue editing. John