From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Are there plans for a multi-threaded Emacs? Date: Thu, 04 Dec 2003 08:14:49 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <4nk75cn2ra.fsf@lockgroove.bwh.harvard.edu> References: <87oevbes4h.fsf@emacswiki.org> <20031117040607.C6C5D79B72@server2.messagingengine.com> <87ekvpx18d.fsf@emptyhost.emptydomain.de> <4nad6cikxy.fsf@holmes.bwh.harvard.edu> <87ptf5zn4k.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 1070544384 14081 80.91.224.253 (4 Dec 2003 13:26:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Dec 2003 13:26:24 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Dec 04 14:26:18 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 1ARtUo-0005Xr-00 for ; Thu, 04 Dec 2003 14:26:18 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARtUo-0007uX-00 for ; Thu, 04 Dec 2003 14:26:18 +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 1ARuJC-0000j8-Bs for emacs-devel@quimby.gnus.org; Thu, 04 Dec 2003 09:18:22 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARuJ0-0000iN-QC for emacs-devel@gnu.org; Thu, 04 Dec 2003 09:18:10 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARuIU-0000ap-Fw for emacs-devel@gnu.org; Thu, 04 Dec 2003 09:18:09 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ARuIT-0000aR-He for emacs-devel@gnu.org; Thu, 04 Dec 2003 09:17:37 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ARtL1-00078s-00 for ; Thu, 04 Dec 2003 14:16:11 +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 1ARtL0-00078k-00 for ; Thu, 04 Dec 2003 14:16:10 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ARtL0-0003Kl-00 for ; Thu, 04 Dec 2003 14:16:10 +0100 Original-Lines: 22 Original-X-Complaints-To: usenet@sea.gmane.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) Cancel-Lock: sha1:Ul1AaMXJcUFTsX6jfeMgfrJFYJs= 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:18363 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18363 On Thu, 04 Dec 2003, rms@gnu.org wrote: > Dynamic binding causes no trouble for multiple threads if each > thread has its own binding stack and switching threads swaps the > bindings. > > However, code like > > (setq global-list (cons foo global-list)) > > is a completely separate issue. The problem here is that thread > switching needs to be prevented between the access to global-list > and the modification of global-list. Of course, the potential for > collision exists because global-list may be referred to elsewhere. > But it does not depend on dynamic bindings. If nobody ever binds > global-list, if its global binding is the only one, the problem > still occurs. Why not just lock all other threads that use that global symbol (it is bound in that thread)? I apologize if I'm missing the point here. Ted