SomeClass {
while(itr.hasNext() {
if (MDS.contains(subj)) {
} else {
listOfLme.add(new LME(subj.getName(),
promptBuilder.toString(), cobBuilder.toString(), openInt));
}
}
} //end class
Hi, I have a loop that adds LME
object to a LinkedList
. As LME objects are being added to the List
, I need multiple threads iterating over what's already in the List and add those objects to database. I have a class that implements Runnable
with constructor parameter LME object. Can someone please show me a simple technique how i can use two threads two iterate over listOfLme
. If this is possible with an Executor
, then I would like to see how this can be achieved.