From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: Using define in multiple threads? Date: Mon, 17 Nov 2008 11:18:45 -0200 Message-ID: References: <3ae3aa420811161427t6b2c65d1q4adcd6e9a5689ddc@mail.gmail.com> Reply-To: hanwen@xs4all.nl NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1226927958 25602 80.91.229.12 (17 Nov 2008 13:19:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2008 13:19:18 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Nov 17 14:20:18 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L241Z-0003gy-C2 for guile-devel@m.gmane.org; Mon, 17 Nov 2008 14:20:17 +0100 Original-Received: from localhost ([127.0.0.1]:47167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L240Q-0007R3-KM for guile-devel@m.gmane.org; Mon, 17 Nov 2008 08:19:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L240N-0007Qo-T9 for guile-devel@gnu.org; Mon, 17 Nov 2008 08:19:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L240M-0007Qb-G0 for guile-devel@gnu.org; Mon, 17 Nov 2008 08:19:03 -0500 Original-Received: from [199.232.76.173] (port=48631 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L240M-0007QY-9d for guile-devel@gnu.org; Mon, 17 Nov 2008 08:19:02 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:36933 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L240L-0000oB-VK for guile-devel@gnu.org; Mon, 17 Nov 2008 08:19:02 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L240K-0005Tu-7c for guile-devel@gnu.org; Mon, 17 Nov 2008 13:19:00 +0000 Original-Received: from 201.80.54.37 ([201.80.54.37]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Nov 2008 13:19:00 +0000 Original-Received: from hanwen by 201.80.54.37 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Nov 2008 13:19:00 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 16 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 201.80.54.37 User-Agent: Thunderbird 2.0.0.16 (X11/20080723) In-Reply-To: <3ae3aa420811161427t6b2c65d1q4adcd6e9a5689ddc@mail.gmail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7856 Archived-At: Linas Vepstas escreveu: > Is it "safe" or "legal" to use define in multiple threads? I guess not. Someone -I forgot who- put in the pthreads without thinking through the consequences. Look through eval.c, you´ll see SCM_SETCAR (expr, SCM_IM_DO); // * SCM_SETCDR (expr, tail); which is very dubious if a thread switch happens at (*) -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen