diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index ad29b5866007429c56c0d2bdc2d7d768d4ab8e79..c04765b0651f59066dd5897f2eaf0924b7113a21 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -199,9 +199,7 @@ void taos_init_imp(void) { // In the APIs of other program language, taos_cleanup is not available yet. // So, to make sure taos_cleanup will be invoked to clean up the allocated resource to suppress the valgrind warning. -#if !defined(TD_WINDOWS) atexit(taos_cleanup); -#endif tscDebug("client is initialized successfully"); } diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index 5f2acef2a5922223fb1ea88168f2ba6a09cb2723..26c2d97fe9bc9e573f16fc45313c68028b94f16f 100644 --- a/src/util/src/tcache.c +++ b/src/util/src/tcache.c @@ -538,8 +538,8 @@ void taosCacheCleanup(SCacheObj *pCacheObj) { // 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. - while(atomic_load_8(&pCacheObj->deleting)) { - // for (int i = 0; i < 20&&atomic_load_8(&pCacheObj->deleting) != 0; i++) { + // while(atomic_load_8(&pCacheObj->deleting)) { + for (int i = 0; i < 60&&atomic_load_8(&pCacheObj->deleting) != 0; i++) { taosMsleep(50); }