From 4eb0c435a30a20440cbe1bf9f9b45428932e9e9d Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 16 Dec 2021 12:58:07 +0800 Subject: [PATCH] [TD-12183]: C# taosdemo multithread (#9118) --- tests/examples/C#/taosdemo/taosdemo.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/examples/C#/taosdemo/taosdemo.cs b/tests/examples/C#/taosdemo/taosdemo.cs index 2c77285488..e62a502d15 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(); } } -- GitLab