|
Restart logic for multithreading
I am coding a shell to bring about multithreading in an existing application. As of now, a shell script is there, and it runs a .exe passing in a data file as parameter. My logic is breaking down the data file into equal partitions and then calling the .exes with each one getting one of the split files. then all the exes run together. My question is, what would be the best restart logic for the above set up ? ie. if one of the threads fail, that will have to be restarted, and exactly when should it start and how the logic has to be implemented? a pseudocode or algorithm would be appreciated.
thanks in advance.
|