From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Are there plans for a multi-threaded Emacs? Date: Wed, 03 Dec 2003 12:16:49 -0500 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> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1070472088 24535 80.91.224.253 (3 Dec 2003 17:21:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2003 17:21:28 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Dec 03 18:21:26 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 1ARago-0001xR-00 for ; Wed, 03 Dec 2003 18:21:26 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARagn-0002MD-00 for ; Wed, 03 Dec 2003 18:21:26 +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 1ARbdz-0003Fn-SE for emacs-devel@quimby.gnus.org; Wed, 03 Dec 2003 13:22:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARbaR-00028k-Vw for emacs-devel@gnu.org; Wed, 03 Dec 2003 13:18:55 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARbZv-0001zA-P3 for emacs-devel@gnu.org; Wed, 03 Dec 2003 13:18:54 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ARbZv-0001z0-38 for emacs-devel@gnu.org; Wed, 03 Dec 2003 13:18:23 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.24) id 1ARacL-0004cw-CJ; Wed, 03 Dec 2003 12:16:49 -0500 Original-To: Ted Zlatanov In-reply-to: <4nad6cikxy.fsf@holmes.bwh.harvard.edu> (message from Ted Zlatanov on Mon, 01 Dec 2003 11:04:09 -0500) 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:18327 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18327 I think migrating Emacs towards a threading model is possible: - start with all primitive or ELisp functions assumed NOT thread-safe - allow threads to run, but any access to a function needs to be synchronous. At first, this will effectively make threads simple switched tasks, and will probably make Emacs slower. Many sections of Lisp code would need to have locking in order to run correctly with multiple threads. For instance, everything of the form (setq global-list (cons foo global-list)) would need locking.