| Threads/Multi-threading Need some help with multi-threading. Basically I need to create a main that creates 2 threads. The 1 thread will read from one file and 2nd thread will read from the 2nd file (basically a file for each thread). The thread will begin reading characters from the file. If a thread encounters a space it will then call the second thread and the 2nd thread will be begin reading the 2nd file. This goes back and forth until both files have been completely read. I am new to threads and just a little confused. I am somewhat knowledgeable of pthread_create, pthread_cond_wait, pthread_exit, etc.. Maybe pseudocode a solution? Help is greatly appreciated.
Thanks,
David Wilks |