提交 5aad68b3 编写于 作者: wafwerar's avatar wafwerar

[TD-6169]<fix>: windows dll client can not quit.

上级 ea2607a7
......@@ -537,8 +537,8 @@ void taosCacheCleanup(SCacheObj *pCacheObj) {
pCacheObj->deleting = 1;
// wait for the refresh thread quit before destroying the cache object.
// But in the dll, the child thread will be killed before atexit takes effect.So here we only wait for one second.
for (int i = 0; i < 20&&atomic_load_8(&pCacheObj->deleting) != 0; i++) {
// But in the dll, the child thread will be killed before atexit takes effect.So here we only wait for 5 seconds.
for (int i = 0; i < 100&&atomic_load_8(&pCacheObj->deleting) != 0; i++) {
taosMsleep(50);
}
......@@ -720,6 +720,8 @@ void* taosCacheTimedRefresh(void *handle) {
continue;
}
pthread_mutex_unlock(&guard);
if ((count % pCacheObj->checkTick) != 0) {
continue;
}
......@@ -739,8 +741,6 @@ void* taosCacheTimedRefresh(void *handle) {
}
taosTrashcanEmpty(pCacheObj, false);
pthread_mutex_unlock(&guard);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册