C-Thread-Pool icon indicating copy to clipboard operation
C-Thread-Pool copied to clipboard

Missing a parethesis

Open onlycparra opened this issue 9 months ago • 1 comments

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); 

onlycparra avatar Mar 31 '25 18:03 onlycparra

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 &.

npc1054657282 avatar Apr 20 '25 12:04 npc1054657282