From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: SCM_DEFER_INTS versus error Date: Tue, 05 Aug 2003 11:37:17 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87el0028c2.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1060047627 18811 80.91.224.253 (5 Aug 2003 01:40:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2003 01:40:27 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 05 03:40:45 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19jqof-0000Xb-00 for ; Tue, 05 Aug 2003 03:40:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19jqmJ-0000Dw-Bg for guile-devel@m.gmane.org; Mon, 04 Aug 2003 21:38:19 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19jqmE-0000DO-A3 for guile-devel@gnu.org; Mon, 04 Aug 2003 21:38:14 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19jqli-0008Ud-Hd for guile-devel@gnu.org; Mon, 04 Aug 2003 21:38:13 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19jqli-0008UK-9f for guile-devel@gnu.org; Mon, 04 Aug 2003 21:37:42 -0400 Original-Received: from snoopy.pacific.net.au ([61.8.0.36]) by mx20.gnu.org with esmtp (Exim 4.20) id 19jqlf-0004tR-Kv for guile-devel@gnu.org; Mon, 04 Aug 2003 21:37:39 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.4) with ESMTP id h751bTdK028743 for ; Tue, 5 Aug 2003 11:37:29 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h751bTCh017798 for ; Tue, 5 Aug 2003 11:37:29 +1000 (EST) Original-Received: from localhost (ppp64.dyn228.pacific.net.au [203.143.228.64]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h751bSPs016552 for ; Tue, 5 Aug 2003 11:37:28 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19jqlM-0001vn-00; Tue, 05 Aug 2003 11:37:20 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2679 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2679 I noticed in the little program below, the thread seems to get hung after an error in the mainline has done an SCM_DEFER_INTS in strptime then escaped with an error, apparently not doing an SCM_ALLOW_INTS. Is there a theory on what should happen with this? Is an error meant to re-allow ints or should code be careful to do an ALLOW after any DEFER? The latter no doubt makes sense irrespective of what an error throw does. Incidentally, I don't think I understand why current-time has a SCM_DEFER_INTS. A simple call to time() ought to be safe shouldn't it? (use-modules (ice-9 threads)) (begin-thread (display "thread started\n") (sleep 2) (display "thread awake again\n") (display "thread trying current-time\n") (current-time) (display "thread done\n")) (sleep 1) (catch #t (lambda () (strptime "xxx" "%Y")) (lambda args (display "main caught strptime error\n"))) (sleep 10) (display "main exiting\n") _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel