From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Threads in emacs implementation Date: Wed, 15 Jun 2005 11:59:08 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <4nll5btxv7.fsf@lifelogs.com> References: <6dbd4d0005060619227dd41364@mail.gmail.com> <87vf4oaft8.fsf@zemdatav.stor.no-ip.org> <4nd5quav0o.fsf@lifelogs.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118852816 23349 80.91.229.2 (15 Jun 2005 16:26:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Jun 2005 16:26:56 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 15 18:26:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Diahl-0006OY-KU for ged-emacs-devel@m.gmane.org; Wed, 15 Jun 2005 18:25:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dian0-0007Z5-JG for ged-emacs-devel@m.gmane.org; Wed, 15 Jun 2005 12:30:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Diam0-0007Mt-4Z for emacs-devel@gnu.org; Wed, 15 Jun 2005 12:29:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dialz-0007Mb-At for emacs-devel@gnu.org; Wed, 15 Jun 2005 12:29:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Diakk-0006qw-EF for emacs-devel@gnu.org; Wed, 15 Jun 2005 12:28:34 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DiaK2-00066h-Pa for emacs-devel@gnu.org; Wed, 15 Jun 2005 12:00:59 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DiaDL-0001D8-48 for emacs-devel@gnu.org; Wed, 15 Jun 2005 17:54:03 +0200 Original-Received: from asimov.bwh.harvard.edu ([134.174.8.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jun 2005 17:54:03 +0200 Original-Received: from tzz by asimov.bwh.harvard.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jun 2005 17:54:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 22 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: asimov.bwh.harvard.edu 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.110004 (No Gnus v0.4) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:Z/z8aaAP6VyQaahVcNoiD/HgnsY= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38893 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38893 On Sat, 11 Jun 2005, rms@gnu.org wrote: > I think an alternate solution is to have no shared variables between > threads once they are forked, and communicate through standard IPC > (pipes, semaphores, etc.). > > This is not possible with shallow binding. All Lisp programs > use the same set of symbols, and each symbol has a value. > Many symbols' values have important standard meanings. I'm not sure I understand the problem. Do you mean that if a user changes variable A in thread 1, he expects thread 2 to also notice the change for certain global variables? That's easy to do, if you consider that such global variables are few and far between compared to local per-thread variables. defvar and similar could just be allowed to make a variable :global, and then any change in any thread would be propagated to the other threads by the VM. I realize this is extra work for the programmers. Multithreading is never free, but the advantages are significant as well. Ted