I have an application which consists of multiple threads.
Most of the threads receive data from socket connections from multiple servers, one thread transforms the data and one data sends out the data on multiple sockets. This runs on a multi-CPU machine and works very efficiently.
Currently the mean thread only sleeps until the time the processing needs to finish.
Currently the programming is not effectively watching when one of the child threads dies. What is the best strategy to monitor this? Checking the thread count or something more fancy like wrapping the childs in eval and working with a shared variable which indicates if the main thread should stop?