fix: add thread join processing

This commit is contained in:
dapan1121 2024-06-07 14:48:39 +08:00
parent 0616d886cb
commit 3d9ddfa2b4
1 changed files with 4 additions and 1 deletions

View File

@ -1514,7 +1514,10 @@ int stmtClose(TAOS_STMT* stmt) {
pStmt->queue.stopQueue = true; pStmt->queue.stopQueue = true;
taosMsleep(10); if (pStmt->bindThreadInUse) {
taosThreadJoin(pStmt->bindThread, NULL);
pStmt->bindThreadInUse = false;
}
STMT_DLOG("stmt %p closed, stbInterlaceMode: %d, statInfo: ctgGetTbMetaNum=>%" PRId64 ", getCacheTbInfo=>%" PRId64 ", parseSqlNum=>%" PRId64 STMT_DLOG("stmt %p closed, stbInterlaceMode: %d, statInfo: ctgGetTbMetaNum=>%" PRId64 ", getCacheTbInfo=>%" PRId64 ", parseSqlNum=>%" PRId64
", pStmt->stat.bindDataNum=>%" PRId64 ", settbnameAPI:%u, bindAPI:%u, addbatchAPI:%u, execAPI:%u" ", pStmt->stat.bindDataNum=>%" PRId64 ", settbnameAPI:%u, bindAPI:%u, addbatchAPI:%u, execAPI:%u"