run same java class by different shell at the same

2019-09-12 17:43发布

问题:

It may be a dumb question but i just want to sure. I want to run same java class(weka text classifier) from different shell script at the same time with different data set. My idea is getting little confusing about this. is that class will behave like multi-thread? if this is the case, is weka classifiers thread-safe?

回答1:

Running multiple instances of Weka classifiers, from different shells, runs them as different processes. This is safe, and their execution would not interfere with each other. Make sure though that they are writing the model to different locations/files.



回答2:

If you launch your program several times from different shells, this will create multiple processes, independent from each other. So there is no multithreading issues between them. Of course, you could get issues if each program in turn uses multiple threads, or if the different processes use the same resources like files.