提交 0e1a4576 编写于 作者: H Hongze Cheng

for debug

上级 8bff6ae0
...@@ -121,7 +121,16 @@ SListNode *tsdbAllocBufBlockFromPool(STsdbRepo *pRepo) { ...@@ -121,7 +121,16 @@ SListNode *tsdbAllocBufBlockFromPool(STsdbRepo *pRepo) {
while (POOL_IS_EMPTY(pBufPool)) { while (POOL_IS_EMPTY(pBufPool)) {
pRepo->repoLocked = false; pRepo->repoLocked = false;
#ifndef NDEBUG
struct timespec abstime = {0, 0};
clock_gettime(CLOCK_REALTIME, &abstime);
abstime.tv_sec += (60 * 15);
if (pthread_cond_timedwait(&(pBufPool->poolNotEmpty), &(pRepo->mutex), &abstime) != 0) {
assert(0);
}
#else
pthread_cond_wait(&(pBufPool->poolNotEmpty), &(pRepo->mutex)); pthread_cond_wait(&(pBufPool->poolNotEmpty), &(pRepo->mutex));
#endif
pRepo->repoLocked = true; pRepo->repoLocked = true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册