'does pthread_join affects concurrently
I want to run all threads concurrently. If I use pthread_join function does it affect running of threads concurrently?
pthread_join(..)
Solution 1:[1]
...does it affect running of threads concurrently?
That seems like a strange thing to ask. Technically speaking, Yes. Nothing in thread A
can happen concurrently with anything in thread B
after thread A
calls pthread_join(B, ...)
.
But that's an obscure, academic way to talk about pthread_join()
. The practical way to say the same thing is, pthread_join(B, ...)
, does not return until thread B
is finished.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |