From 2e4229717eb4ac24e92657224a7170e1c4714fcd Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 20 Jul 2021 23:04:30 +0800 Subject: [PATCH] [td-225]fix compiler error. --- src/util/src/tcache.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index 434d88894b..e847debb89 100644 --- a/src/util/src/tcache.c +++ b/src/util/src/tcache.c @@ -535,7 +535,7 @@ void taosCacheCleanup(SCacheObj *pCacheObj) { pCacheObj->deleting = 1; // 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); } @@ -729,8 +729,11 @@ void* taosCacheTimedRefresh(void *handle) { } _end: - cacheRefreshWorker = 0; taosArrayDestroy(pCacheArrayList); + + pCacheArrayList = NULL; + pthread_mutex_destroy(&guard); + uDebug("cache refresh thread quits"); return NULL; }