Fixes #2714: Use a concurrent list to back NetworkList (#2715)

This commit is contained in:
yueh 2016-12-29 15:51:17 +01:00 committed by GitHub
parent 2ab0528015
commit 497f1c9ace

View file

@ -21,8 +21,8 @@ package appeng.me;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
/**
@ -31,7 +31,7 @@ import java.util.List;
public class NetworkList implements Collection<Grid>
{
private List<Grid> networks = new LinkedList<Grid>();
private List<Grid> networks = new CopyOnWriteArrayList<>();
@Override
public int size()
@ -108,6 +108,6 @@ public class NetworkList implements Collection<Grid>
@Override
public void clear()
{
this.networks = new LinkedList<Grid>();
this.networks.clear();
}
}