提交 4764e12d 编写于 作者: wu-sheng's avatar wu-sheng

sleep 1 millisecond stead of 1 namos, avoid thread resource contention.

上级 741ec6ac
......@@ -23,7 +23,7 @@ public class StorageThread extends Thread {
StorageThread(long count, CountDownLatch countDownLatch, int index) {
listener = new MyStorageClientListener();
client = new Client("127.0.0.1", 34000).newSpanStorageClient(listener);
client = new Client("10.128.34.248", 34000).newSpanStorageClient(listener);
this.count = count;
this.countDownLatch = countDownLatch;
this.index = index;
......@@ -52,7 +52,10 @@ public class StorageThread extends Thread {
cycle = 0;
while(!listener.isCompleted){
LockSupport.parkNanos(1);
try {
Thread.sleep(1L);
} catch (InterruptedException e) {
}
}
listener.begin();
ackSpanList.clear();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册