Hello I am new to pthread and, trying to test this program.
http://www.ibm.com/developerworks/library/l-posix3/
This program is working very well, but one thing. what is this sleep() in main thread? if I change it to sleep(2) to shorter or putting more task on this *threadfunc.
The thread finish before completing the all tasks. Is there any better way to wait until the task finish?