Main function stops at pthread_join and won't call the next join

So I'm trying to create multiple threads to read from a file and write to another file. But I'm facing some problems with pthread_join.

"The pthread_join() function shall suspend execution of the calling thread until the target thread terminates, unless the target thread has already terminated."

So that means my main function will suspend itself and not call the next pthread_join. As tested with my code below, my program does halts forever after "Joining 0 R thread."

However, all the examples I find online use the same for loop method to call multiple thread joins.

/*create read threads*/
for (counter = 0; counter < nThreads; counter++){
    pthread_create(&reader[counter], NULL, &readFile, NULL);
    printf("Created %d R thread.\n", counter);
}

/*create write threads*/
for (counter1 = 0; counter1 < nThreads; counter1++){
    pthread_create(&writer[counter1], NULL, &writeFile, NULL);
    printf("Created %d W thread.\n", counter1);
}

/*join read threads*/
for (counter2 = 0; counter2 < nThreads; counter2++){
    printf("Joining %d R thread.\n", counter2);
    pthread_join(reader[counter2], NULL);
    printf("Joined %d R thread.\n", counter2);
}

/*join write threads*/
for (counter3 = 0; counter3 < nThreads; counter3++){
    printf("Joining %d W thread.\n", counter3);
    pthread_join(writer[counter3], NULL);
    printf("Joined %d W thread.\n", counter3);
}

So right now my main question is...

How does the main function call the next ptrhead_join in a for loop if it's supposed to be suspended.