diff --git a/tests/examples/C#/taosdemo/taosdemo.cs b/tests/examples/C#/taosdemo/taosdemo.cs index 2c77285488830323ed03a04a1d1c89c048ad2ea8..e62a502d1508c1339e559160b50da39e622a021f 100644 --- a/tests/examples/C#/taosdemo/taosdemo.cs +++ b/tests/examples/C#/taosdemo/taosdemo.cs @@ -361,7 +361,10 @@ namespace TDengineDriver threadArr[i] = new Thread(createTableThread.ThreadMain); threadArr[i].Start(); - threadArr[i].Join(); + } + for (int j = 0; j < numOfThreads; j++) + { + threadArr[j].Join(); } } @@ -482,7 +485,10 @@ namespace TDengineDriver threadArr[i] = new Thread(insertThread.ThreadMain); threadArr[i].Start(); - threadArr[i].Join(); + } + for (int j = 0; j < numOfThreads; j++) + { + threadArr[j].Join(); } }