Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 293 by [email protected]: pthread_cond_signal(&cq->cond) is needless.
http://code.google.com/p/memcached/issues/detail?id=293

static void cq_push(CQ *cq, CQ_ITEM *item) {
    item->next = NULL;

    pthread_mutex_lock(&cq->lock);
    if (NULL == cq->tail)
        cq->head = item;
    else
        cq->tail->next = item;
    cq->tail = item;
    pthread_cond_signal(&cq->cond);
    pthread_mutex_unlock(&cq->lock);
}

pthread_cond_signal(&cq->cond) should be removed because there is no
pthread_cond_wait(&cq->cond, &cq->lock) in version 1.4.15.

Reply via email to