From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.bugs,gmane.lisp.guile.user Subject: Re: Does anyone actually use threads with guile? Date: Thu, 13 Nov 2008 21:46:44 +0100 Message-ID: References: <3ae3aa420811122028w3c069b88q93a8290385188f79@mail.gmail.com> <3ae3aa420811122056x3d2b2f75nc22a66ae1d977902@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226610009 1224 80.91.229.12 (13 Nov 2008 21:00:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2008 21:00:09 +0000 (UTC) Cc: bug-guile@gnu.org, guile-user , guile-devel@gnu.org To: linasvepstas@gmail.com Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Nov 13 22:01:11 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 1L0jJN-0005kz-Sm for guile-devel@m.gmane.org; Thu, 13 Nov 2008 22:01:10 +0100 Original-Received: from localhost ([127.0.0.1]:50975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0jIF-0002ad-VO for guile-devel@m.gmane.org; Thu, 13 Nov 2008 15:59:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0jHt-0002Vg-8u for guile-devel@gnu.org; Thu, 13 Nov 2008 15:59:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0jHq-0002UH-4l for guile-devel@gnu.org; Thu, 13 Nov 2008 15:59:36 -0500 Original-Received: from [199.232.76.173] (port=51085 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0jHo-0002TK-7p; Thu, 13 Nov 2008 15:59:32 -0500 Original-Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:36099 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0jHn-0006EI-RP; Thu, 13 Nov 2008 15:59:31 -0500 Original-Received: from localhost.localdomain (localhost [127.0.0.1]) by b-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 9D71216987; Thu, 13 Nov 2008 15:59:23 -0500 (EST) Original-Received: from unquote (104.Red-88-17-128.dynamicIP.rima-tde.net [88.17.128.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by b-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 9C18E1697B; Thu, 13 Nov 2008 15:59:08 -0500 (EST) In-Reply-To: <3ae3aa420811122056x3d2b2f75nc22a66ae1d977902@mail.gmail.com> (Linas Vepstas's message of "Wed, 12 Nov 2008 22:56:13 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Pobox-Relay-ID: F31B6D82-B1C5-11DD-A1C0-C128113D384A-02397024!a-sasl-quonix.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:7838 gmane.lisp.guile.bugs:4093 gmane.lisp.guile.user:6902 Archived-At: Hi Linas, [cc'ing them all, but followups to just one please -- bug-guile is probably best] For my part I apologize for not having the cycles to poke this more thoroughly. Fortunately you are a good programmer and can figure things out :) History: pthread support was new with 1.8, as you probably know. A number of people have used it, but it seems that perhaps you are pounding it more than most. On Thu 13 Nov 2008 05:56, "Linas Vepstas" writes: > Basically, at any given time, some thread might be > in a critical section. Some other thread may be > throwing an error for some utterly unrelated reason. > Yet, when the error is thrown, this "critical section" > check will trip, and it will do so for an utterly bogus > reason. At least, that describes my case. > > Is there any reason at all not to remove this check > entirely? (at libguile/throw.c line 695.) I think the idea behind the check sounds good -- it is incorrect to throw from within a critical section, and the check detects this. But the check is incorrect as you noticed, it should be checking if the current thread is in a critical section. So we have two options, to remove the check or to fix the critical section counter (possiblity to be thread-local). My instinct would be that removal is the correct solution in 1.8, and that in master the decision depends on whether we merge the BDW GC or not, and what the impact that GC has on the idea of critical sections. More input appreciated. Cheers, Andy -- http://wingolog.org/