run same java class by different shell at the same

2019-09-12 17:09发布

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?

2条回答
手持菜刀,她持情操
2楼-- · 2019-09-12 17:58

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.

查看更多
迷人小祖宗
3楼-- · 2019-09-12 18:09

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.

查看更多
登录 后发表回答