how to implement multitheading using POSIX threads...?
pthread_create( &thread1, NULL, print_message_function, (void*) message1);
Here, thread is created only for one function. What if there are multiple functions in a single thread??
thank u for the examples... :)
But what if print_message_function() has 2-3 more functions called inside?? I mean if print_message_function() is threaded, will functions inside it be threaded????
You're asking for trouble if you don't use thread classes. It constrains your thinking in useful ways.
If you just think about using thread functions and trying to get them to sync with each other, you're asking for trouble.