LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Usage of pipes in multithreaded application.... (https://www.linuxquestions.org/questions/programming-9/usage-of-pipes-in-multithreaded-application-402829/)

rajsun 01-13-2006 05:23 AM

Usage of pipes in multithreaded application....
 
Hi all
Can we use pipes for communicating between threads in the same process??

What is the overhead incurred because of this?

Is synchronization required for concurrent write to pipes by many threads of the same process??



With Regards,
RajSun

jtshaw 01-13-2006 06:40 AM

I suppose you could use a pipe to communicate between threads of the same process, but I'm not sure why you would want to. I'd think it would be just as easy to setup a queue within the threaded process itself that the threads have access too.

As for synchronization.. if two threads can potentially write to the same data at the same time, you need to make sure that doesn't happen.


All times are GMT -5. The time now is 07:03 AM.