From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.user Subject: Re: Guile + pthreads + reentrancy? Date: Tue, 24 Feb 2004 17:09:26 -0500 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: <16442.35630.790674.12804@gargle.gargle.HOWL> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077661123 12809 80.91.224.253 (24 Feb 2004 22:18:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2004 22:18:43 +0000 (UTC) Cc: guile-user@gnu.org, djurfeldt@nada.kth.se Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Feb 24 23:18:35 2004 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 1Avksm-0003zX-00 for ; Tue, 24 Feb 2004 23:18:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Avksl-0000FM-TY for guile-user@m.gmane.org; Tue, 24 Feb 2004 17:18:27 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AvkpX-0007Er-Ff for guile-user@gnu.org; Tue, 24 Feb 2004 17:15:07 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Avkow-0006si-BZ for guile-user@gnu.org; Tue, 24 Feb 2004 17:15:01 -0500 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Avkk7-0005ob-Pe for guile-user@gnu.org; Tue, 24 Feb 2004 17:09:31 -0500 Original-Received: from chunk.mit.edu ([18.42.2.92] helo=chunk ident=Debian-exim) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1Avkk3-0004Ef-00; Tue, 24 Feb 2004 23:09:27 +0100 Original-Received: from mdj by chunk with local (Exim 4.30) id 1Avkk2-0007Y3-K8; Tue, 24 Feb 2004 17:09:26 -0500 Original-To: bindej@rpi.edu In-Reply-To: <16442.35630.790674.12804@gargle.gargle.HOWL> (bindej@rpi.edu's message of "Mon, 23 Feb 2004 18:22:22 -0500") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2843 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2843 bindej@rpi.edu writes: > I did the message-queueing kludge. It works, although it is messy. > But it's not reentrant. If I tell Guile's pthread to call > scm_eval_string, which in turn calls a gsubr, and that gsubr spawns a > new pthread which queues a call to scm_makfrom0str, we have a > deadlock. One thing you could do is to insert a conditional into the queue_insert routine which checks whether the caller is the Guile thread. If it is, you evaluate the form immediately instead of queuing it up. M _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user