Forking and Joining Workers
/* give workers their input */
distiller->Send(input);
decrypter->Send(pipe);
/* give workers their output */
distiller->Send(pipe);
decrypter->Send(output);
/* wait for workers to finish */
distiller->Join();
decrypter->Join();
distiller = new Thread();
distiller->Fork(Distill());
decrypter = new Thread();
decrypter->Fork(Decrypt());
pipe = new Pipe();
input
output
pipe
distiller
decrypter
HTTP handler
Previous slide
Next slide
Back to first slide
View graphic version