From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Are there plans for a multi-threaded Emacs? Date: 04 Dec 2003 16:44:16 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87oevbes4h.fsf@emacswiki.org> <20031117040607.C6C5D79B72@server2.messagingengine.com> <87ekvpx18d.fsf@emptyhost.emptydomain.de> <4nad6cikxy.fsf@holmes.bwh.harvard.edu> <4nllpt3hr3.fsf@lockgroove.bwh.harvard.edu> <5bad69zd43.fsf@lister.roxen.com> <4noeuon378.fsf@lockgroove.bwh.harvard.edu> <87smk0zl2w.fsf@kanga.tapsellferrier.co.uk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1070554303 5114 80.91.224.253 (4 Dec 2003 16:11:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Dec 2003 16:11:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Dec 04 17:11:40 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 1ARw4q-0001xj-00 for ; Thu, 04 Dec 2003 17:11:40 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARw4p-0001RT-00 for ; Thu, 04 Dec 2003 17:11:39 +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 1ARwyx-0002TN-6q for emacs-devel@quimby.gnus.org; Thu, 04 Dec 2003 12:09:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARwxp-0002Di-4L for emacs-devel@gnu.org; Thu, 04 Dec 2003 12:08:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARwrR-0000z6-IN for emacs-devel@gnu.org; Thu, 04 Dec 2003 12:02:24 -0500 Original-Received: from [62.226.11.218] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARwbq-0005ti-5Y for emacs-devel@gnu.org; Thu, 04 Dec 2003 11:45:46 -0500 Original-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id hB4FiHNa006834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Dec 2003 16:44:17 +0100 Original-Received: (from dak@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id hB4FiHwx006830; Thu, 4 Dec 2003 16:44:17 +0100 Original-To: Nic Ferrier In-Reply-To: <87smk0zl2w.fsf@kanga.tapsellferrier.co.uk> Original-Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:18375 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18375 Nic Ferrier writes: > > So changing Emacs' scopes to lexical is a prerequisite for any > > meaningful attempt at multithreading, anyway. > > Except that it's more important that Emacs uses dynamic scope than > multi-threading. Dynamic scope is _one_ of the reasons Emacs has been > sucessfull. > > rms wrote a paper about the design of Emacs which, I think, > succesfully justifies the choice of dynamic scope: > > http://www.gnu.org/software/emacs/emacs-paper.html In this paper, Stallman writes It is not necessary for dynamic scope to be the only scope rule provided, just useful for it to be available. And one has to realize the costs associated with dynamic scopes: essentially it means that every function, no matter how large or small, receives and uses the global binding table as an implicit argument. This has some principal advantages as those outlined by Stallman in the paper. It also has huge disadvantages where code generation and verification are concerned. Those disadvantages are what makes the prospect of multithreading in connection with dynamical scope unrealistic: there will always be contention and locking issues with the universally accessed resource of the binding table. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum