Replace add with addAll, reduce the invoke time a little. (#2766)
This commit is contained in:
parent
83ce7cc4cb
commit
bfd46151ad
|
|
@ -90,9 +90,7 @@ public class ConsumerThread<T> extends Thread {
|
||||||
if (data.size() == 0) {
|
if (data.size() == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (T element : data) {
|
consumeList.addAll(data);
|
||||||
consumeList.add(element);
|
|
||||||
}
|
|
||||||
hasData = true;
|
hasData = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue