0
I am using the following routine with library command pthread.h
:
//
// Declaração
//
pthread_t threads[NUM_THREADS];
//
// Criacao
//
for(...)
{
pthread_create(&threads[i], NULL, MainTH, (void *) &thread_args[i]);
}
//
// execução
//
for(...)
{
pthread_join(threads[i], NULL);
}
That way they don’t work independently, right?
await the termination of the other Thread
wanted to know, how do I work with them separately, independently?
yes, but only removing this function will make them work independently, it will not occur of the program to close since the main will not wait for threads and enter reach the end?
– Lucas Fernandes