C-Thread-Pool
C-Thread-Pool copied to clipboard
Missing a parethesis
https://github.com/Pithikos/C-Thread-Pool/blob/4eb5a69a439f252d2839af16b98d94464883dfa5/thpool.c#L176
I thing you meant to write:
pthread_cond_init(&(thpool_p->threads_all_idle), NULL);
The author's use is all right. There is no functional difference between
pthread_cond_init(&thpool_p->threads_all_idle, NULL);
and
pthread_cond_init(&(thpool_p->threads_all_idle), NULL);
The member‑access operator -> has higher precedence than the address‑of operator &.