Joined: Sat Jan 03, 2009 4:53 pm Posts: 1 Has thanked: 0 time Have thanks: 0 time
Hey,
I'm developing a multi-threaded program in C. I have a thread - a dispatcher responsible for receiving information from a pipe and sending it to three other threads I used conditional variables to (try) to synchronize the program, but I'm having some problems.
What I'm trying to do is: when I receive something in the pipe (the filename) the thread dispatcher sends a signal to thread1 in order for this to compress the file, after that the thread2 will work in that same file (modified by thread1). Note, I could have different files, so thread1 is compressing one file and thread2 is encrypting another.
The problem is that, after receiving a signal, only thread1 works. I've tried with broadcast() but in that case it's worse...
Any help is very welcome,
Thanks
ajeet
Question subject: Re: Multi Thread Program
Posted: Sat Jan 03, 2009 6:02 pm
Joined: Mon Jun 02, 2008 6:15 am Posts: 3 Location: India Has thanked: 0 time Have thanks: 0 time
Hi.. you did not write problem clearly here..
can u send ur programme that i can debug that..
or u can use fork here instead of thereads.. create two process do ur work it would be better option to do so.. as i can understand Your Problem..