Untitled

 avatar
unknown
plain_text
3 years ago
224 B
4
Indexable
t=(pthread_t *)malloc(ch * sizeof(pthread_t ));
    for(i=0;i<ch;i++)
    {
        pthread_create(&t[i],NULL,print,NULL); //Default Attributes
    }
    for(i=0;i<ch;i++)
    {
        pthread_join(t[i],NULL);
    }
Editor is loading...