LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-13-2006, 05:23 AM   #1
rajsun
Member
 
Registered: Mar 2005
Posts: 61

Rep: Reputation: 15
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
 
Old 01-13-2006, 06:40 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any application that monitors usage time just like in cyber cafe? Niceman2005 Linux - Software 0 10-27-2005 08:44 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Creating a Multithreaded Application kamransoomro84 Programming 3 06-03-2004 08:55 AM
Closing Socket in MultiThreaded Application Fails laalitseth Red Hat 0 04-21-2004 12:44 AM
Inhibiting the usage of some keys when running an application under KDE Paulo Góes Linux - Hardware 6 07-05-2003 09:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration