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????
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????
Yes, and you need to take care of the variables that are shared amongst the threads. I. e. protect concurrent access with mutexes
By the way: each thread has an unique id and so you can find out in what thread the current function is running