Subj : Re: mutex problem To : comp.programming.threads From : LinuxGuy Date : Fri Jun 17 2005 03:13 am Hi , Actually I am using pthread library and consider "Thread" as wrapper class it would be like this and "threadFunction" is the thread body actually.. but thanks your 2 mutexes soultion can be one option class a : public Thread { public : void threadFunction() { mutex.lock() here doing some processing and updating "sampleString" mutex.unlock() } void anotherFuntion() { here I want to update "sampleString" and this function will be called from any other cpp file but at that time "threadFunction may have locked the resources. and using "sampleString" can you please tell me how to protect data or to execute functions without affecting each others data } private : string sampleString; - Hide quoted text - .