Replace add with addAll, reduce the invoke time a little. (#2766)

This commit is contained in:
zhangwei 2019-05-27 23:08:11 +08:00 committed by 吴晟 Wu Sheng
parent 83ce7cc4cb
commit bfd46151ad
1 changed files with 1 additions and 3 deletions

View File

@ -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;
} }