From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Robert Marlow Newsgroups: gmane.lisp.guile.user Subject: Re: Problems with Select + threads + pipes Date: 05 Aug 2003 12:15:38 +0800 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <1060056938.25787.29.camel@helicon> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1060057664 32635 80.91.224.253 (5 Aug 2003 04:27:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2003 04:27:44 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Aug 05 06:28:02 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 19jtQY-0004lS-00 for ; Tue, 05 Aug 2003 06:28:02 +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 19jtNW-0004hf-0d for guile-user@m.gmane.org; Tue, 05 Aug 2003 00:24:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19jtJB-0000aD-T8 for guile-user@gnu.org; Tue, 05 Aug 2003 00:20:25 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19jtIA-0005wG-3K for guile-user@gnu.org; Tue, 05 Aug 2003 00:19:53 -0400 Original-Received: from [130.95.128.56] (helo=asclepius.uwa.edu.au) by monty-python.gnu.org with esmtp (Exim 4.20) id 19jtEZ-0002Bi-GR for guile-user@gnu.org; Tue, 05 Aug 2003 00:15:39 -0400 Original-Received: from 127.0.0.1 (localhost [127.0.0.1]) by dummy.domain.name (Postfix) with SMTP id 4C75936757E for ; Tue, 5 Aug 2003 12:15:38 +0800 (WST) Original-Received: from localhost.localdomain (helicon.ucs.uwa.edu.au [130.95.86.66]) by asclepius.uwa.edu.au (Postfix) with ESMTP id 4734236757D for ; Tue, 5 Aug 2003 12:15:38 +0800 (WST) Original-To: guile-user@gnu.org X-Mailer: Ximian Evolution 1.0.5 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:2143 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2143 *sigh* seems that's not quite the same bug. My actual program mutex locks during the pipe creation and closing times but unlocks for everything imbetween. If I do that in these example script it fixes the bug so it seems the bug produced by these scripts is slightly different. I'm highly confused. Does anyone know if there's bugs in the guile implementation of select? I forgot to mention but the error I keep getting is as follows: program.scm:379:19: In procedure select in expression (select (vector s) (quote ()) ...): program.scm:379:19: Bad file number Broken Pipe Anyway, I'll continue to see if I can narrow down where this elusive bug is and post again then *mutter mutter* On Tue, 2003-08-05 at 10:58, Robert Marlow wrote: > Hi all > > I'm really stuck on this problem. I have one thread which listens on a > network socket for content. It uses select so the accept bug doesn't > block all threads. I then have another thread which waits for a message > string and then spits it out to another program via a pipe. The > combination of threads + select + pipes seems to cause problems in my > program. > > I can get rid of the problem if I lock the mutex while using the pipe, > however this defeats the purpose of using threads; I don't want the time > consuming piped process wasting time that could be used by other > threads. > > I have attached two trimmed-down scripts as an example of my problem. > I'd really, really appreciate it if someone could shed some light on > what the problem is. Thanks. > > > -- > Regards, > > Robert Marlow -- Regards, Robert Marlow _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user