to write threads
hi all
i have a doubt. i wrote a program using threads. i used threads like this void one() { pthread_t thread; gint iret1; iret1=pthread_create( &thread, NULL, two, NULL); } void two() { printf("enterd in to thread \n"); three(); pthread_exit(0); } void three() { printf("hiiiiiiii \n"); } can you tell is this wright way to use threads. help me thank you in advance |
Hi
It's not easy to say from the code you posted. I learned about this not so long ago. One place I found good information was: http://en.wikipedia.org/wiki/Pthreads Look in the "External links" sections. There are some tutorials and examples, and if you follow the links, you can get even more tutorials and examples. I got a multithreaded program working by reading that stuff. |
from http://www.faqs.org/docs/artu/
The Art of Unix Programming Eric Steven Raymond Quote:
|
All times are GMT -5. The time now is 01:54 PM. |