Re: Pipes and fd question. Large amounts of data.

From: Gianni Mariani (gi2nospam_at_mariani.ws)
Date: 01/30/05


Date: Sun, 30 Jan 2005 07:24:43 -0800

Oded Shimon wrote:
> I have a rather unique situation. I have 2 programs, neither of which have
> control over.
> Program A writes into TWO fifo's.
> Program B reads from two fifo's.
>
> My program is the middle step.

Use 4 threads. A reader thread that reads into a large memory buffer and
a writer that writes from this buffer into the outgoing pipe for both pipes.

> I am looking for alternative/better suggestions.