Re: Help: multithreaded GNOME app



> ??  man pipe.  It allocates two descriptors for you, one read, and one
> write.  If you want bi-directional communication, create two pipes.

Quite right.  Forgive my stupidity -- I thought pipe linked together two
already-allocated file descriptors.

> For speed, you only want to send read or write a single byte to the
> pipe.  This is sufficient to wake up the process.  Do not use the pipe
> to pass data larger than sizeof(void*) to the main process, doing so is
> very wasteful. 

One byte is all I'd use, yeah.  Is there some low-level rationale behind why
passing data specifically larger than sizeof(void *) is wasteful?  Something
to do with the memory bus?

Thanks much,
Jason.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]