are posix pipes lightweight?

Posted by Nils Pipenbrinck on Stack Overflow See other posts from Stack Overflow or by Nils Pipenbrinck
Published on 2010-03-28T14:42:05Z Indexed on 2010/03/28 14:43 UTC
Read the original article Hit count: 600

Filed under:
|
|
|

In a linux application I'm using pipes to pass information between threads.

The idea behind using pipes is that I can wait for multiple pipes at once using poll(2). That works well in practice, and my threads are sleeping most of the time and only wake up if there is something to do for them.

On the user-space the pipes look just like two file-handles. Now I wonder wonder how much resources such a pipes use on the OS side.

Btw: In my application I only send single bytes every now and then. Think about my pipes as simple message queues that allow me to wake-up receiving threads, tell them to send some status-data or to terminate.

© Stack Overflow or respective owner

Related posts about linux

Related posts about pipes