Subj : Re: Acessing global object's method To : comp.programming.threads From : Arrive Date : Sat Feb 19 2005 11:20 pm Yes, it was POSIX pthread. Thanks for your answer. DW David Schwartz wrote: > "Da Wang" wrote in message > news:IC6qJG.JML@campus-news-reading.utoronto.ca... > >>Is it necessary to add mutex when I access a global object's method? I >>only read some information from it but the method requires some >>computation inside the object. > > > Are we talking POSIX pthreads? If so, the answer is that mutexes don't > lock functions, but they lock data. If the method requires reading data that > might be written in another thread, then yes. > > DS > > -- Life is the time to do something. .