Skip to content

Commit

Permalink
Fix ConcurrentModificationException reported by Jeff Walt <jeffwalt63…
Browse files Browse the repository at this point in the history
  • Loading branch information
plam committed Jun 25, 2010
1 parent 773ee75 commit e9cf682
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public void run()
while(addedNew)
{
addedNew = false;
Iterator<AbstractRuntimeThread> it = runAtOnceCandidates.iterator();
ListIterator<AbstractRuntimeThread> it = runAtOnceCandidates.listIterator();
while(it.hasNext())
{
AbstractRuntimeThread someThread = it.next();
Expand All @@ -292,7 +292,7 @@ public void run()
MHPLists.add(someThread); // add a second copy of it
someThread.setStartMethodMayHappenInParallel();
someThread.setRunsMany();
runAtOnceCandidates.remove(someThread);
it.remove();
if(optionPrintDebug)
G.v().out.println(someThread.toString());
addedNew = true;
Expand Down

0 comments on commit e9cf682

Please sign in to comment.