[td-225]fix compiler error.

This commit is contained in:
Haojun Liao 2021-07-20 23:04:30 +08:00
parent c01f04a209
commit 2e4229717e
1 changed files with 5 additions and 2 deletions

View File

@ -535,7 +535,7 @@ void taosCacheCleanup(SCacheObj *pCacheObj) {
pCacheObj->deleting = 1; pCacheObj->deleting = 1;
// wait for the refresh thread quit before destroying the cache object. // wait for the refresh thread quit before destroying the cache object.
while(atomic_load_64(&cacheRefreshWorker) != 0) { while(atomic_load_ptr((void**)&pCacheArrayList) != 0) {
taosMsleep(50); taosMsleep(50);
} }
@ -729,8 +729,11 @@ void* taosCacheTimedRefresh(void *handle) {
} }
_end: _end:
cacheRefreshWorker = 0;
taosArrayDestroy(pCacheArrayList); taosArrayDestroy(pCacheArrayList);
pCacheArrayList = NULL;
pthread_mutex_destroy(&guard);
uDebug("cache refresh thread quits"); uDebug("cache refresh thread quits");
return NULL; return NULL;
} }