Hello everyone,
Im trying to create 7 threads in a row, very simple. I want all threads to be created, even if the previous thread hasnt finished yet. I am using the <pthread.h> include. Here is the part of my code where I create the threads:
Code is written in C and compiled in unix using gcc and -lpthread switch.Code:pthread_t tid1, tid2; pthread_attr_t attr; pthread_attr_init(&attr); pthread_create(&tid1, NULL, Process1(), NULL); /*this works fine*/ pthread_create(&tid2, NULL, Process2(), NULL); /*doesnt get here*/
Daniel




Reply With Quote