guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with Select + threads + pipes


From: Robert Marlow
Subject: Re: Problems with Select + threads + pipes
Date: 05 Aug 2003 12:15:38 +0800

*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









reply via email to

[Prev in Thread] Current Thread [Next in Thread]