I am using the following routine with command pthread.h
library:
//
// 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 do not work independently, right?
wait for the termination of the other Thread
I wanted to know, how do I work with them separately, independent?