TS-Benchmark
TS-Benchmark copied to clipboard
TSBM - queue.take blocking
queue.take() will hang forever and block thread2.join and thread3.join later. You can use queue.poll(timeout, unit) instead.
@@ -255,9 +258,9 @@ public class TSBM { break; } try {
-
String data = queue.take();
-
String data = queue.poll(100, TimeUnit.MILLISECONDS); if (data == null) {
-
Thread.sleep(100);
-
//Thread.sleep(100); continue; } adapter.insertData(data);
@@ -265,6 +268,7 @@ public class TSBM { e.printStackTrace(); }

Thanks, you can fork this, then make a PR.