On Fri, Nov 13, 2009 at 12:01 PM, Abhijit Bhopatkar <b...@devslashzero.com> wrote: > >> Create a pipe. Write data into that pipe from thd_r. In thd_w, you can >> do a blocking read on the pipe. > > No, you don't want to do that, > Passing data around pipes is expensive, you might as well busy spin in write > thread. (yes there is always a splice syscall to do a zero copy op, but its > complicated and not needed, all we need here is a conditional variable).
How is a busy spin better than a blocking read on a pipe? Also, since he is streaming, he needs a 'stream' (perhaps eventually, the write may not be so fast?). Either he would have to implement buffer management to get the desired stream functionality or go for something like a pipe. -aditya _______________________________________ Pune GNU/Linux Users Group Mailing List