> I need to write a c-program that gives orders and get results back from many
> child processes. I don't want the parent process to have to wait while the
> child prepairs the data. I want it to be able to deal with another child and
> then, later when the first child's response is ready, go back and retrieve
> it.
> I guess I have some choices to make here:
> * Should I fork or should I start a new independent process?
> * How should I communicate between the processes? pipe, fifo or sockets?
> * How will I know when the child-processes are ready to send?
are
the child processes doing?
At least with threads you don't have to bother with IPC and they can all
share data. A simple mutex protected queue can be used to pass messages
back to the 'main' thread.
Ian