From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.devel Subject: Re: Are there plans for a multi-threaded Emacs? Date: Sat, 06 Dec 2003 20:58:28 +0000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <877k19slxn.fsf@emptyhost.emptydomain.de> References: <87oevbes4h.fsf@emacswiki.org> <20031117040607.C6C5D79B72@server2.messagingengine.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1070744420 2259 80.91.224.253 (6 Dec 2003 21:00:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Dec 2003 21:00:20 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Dec 06 22:00:17 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 1ASjXF-0004EX-00 for ; Sat, 06 Dec 2003 22:00:17 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ASjXF-0001Q4-00 for ; Sat, 06 Dec 2003 22:00:17 +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 1ASkUV-000320-HT for emacs-devel@quimby.gnus.org; Sat, 06 Dec 2003 17:01:31 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ASkTu-0002vp-7t for emacs-devel@gnu.org; Sat, 06 Dec 2003 17:00:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ASkTB-0002cL-MO for emacs-devel@gnu.org; Sat, 06 Dec 2003 17:00:40 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ASkTA-0002av-M9 for emacs-devel@gnu.org; Sat, 06 Dec 2003 17:00:08 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ASjVi-0000Yx-00 for ; Sat, 06 Dec 2003 21:58:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ASjVh-0000Yp-00 for ; Sat, 06 Dec 2003 21:58:41 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ASjVh-0000Wa-00 for ; Sat, 06 Dec 2003 21:58:41 +0100 Original-Lines: 17 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:es07Cl/lvxL0/WP/qvfIPfMNWmA= 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:18475 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18475 Miles Bader writes: > Consider a simple bit of elisp code: (setq GLOBAL (cons 'x GLOBAL)) > In a pre-emptively threaded emacs, another thread could run between > accessing GLOBAL and setting it. Whoops. Somebody suggested to avoid this by putting big locks around everything and then to relax them. I made the suggestion to "just" let the implementor of the new thread code worry about such things: if you start a new thread then you're responsible for letting it run code that doesn't access globals in problematic ways. Apparently, the big-lock suggestion is better, but why? Kai