Just started learning to use POSIX threads, but I find that every time I create a thread and/or join it, the calling thread halts until the called thread completes its iteration. How do I execute them parallel to one another?
Thanks.
Name:
Anonymous2007-08-17 22:05 ID:kRXGqyPR
>>7
I tested your code using the Sun compiler:
$ CC test.cpp -o test -lpthread -mt
"test.cpp", line 23: Warning (Anachronism): Formal argument 3 of type extern "C" void*(*)(void*) in call to pthread_create(unsigned*, const _pthread_attr*, extern "C" void*(*)(void*), void*) is being passed void*(*)(void*).
1 Warning(s) detected.
$ ./test