List<Thread> threads = new ArrayList<>();
for (int i=0;i<listStrings.size();i++) {
heshteg.setHeshteg(listStrings.get(i));
try {
threads.add(new Thread((InterfaceSearchHeshteg)heshteg.clone()));
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
threads.get(threads.size()-1).start();
if (threads.size() >= 200) {
threadClose(threads);
threads = new ArrayList<>();
}
}