[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with Select + threads + pipes
From: |
Robert Marlow |
Subject: |
Problems with Select + threads + pipes |
Date: |
05 Aug 2003 10:58:17 +0800 |
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
buggy.scm
Description: Text Data
buggy-companion.scm
Description: Text Data
- Problems with Select + threads + pipes,
Robert Marlow <=