You are viewing a single comment's thread from:

RE: Networking - C Threads in Linux

in #networking6 years ago

Haha of course...
When a process or thread runs the main process/thread that created it must finish after it.
For threads we use the function pthread_join() with an important parameter being the thread_id (the number which represents the thread in the Operating system).
So, because we have N threads and because the id's are stored in an array, we have a for loop so that the main process/thread waits for all of them :)

Coin Marketplace

STEEM 0.17
TRX 0.14
JST 0.029
BTC 59214.68
ETH 2622.69
USDT 1.00
SBD 2.44