Subj : Re: Challenge: Multithreading & Synchronization To : comp.programming.threads From : Sergei Organov Date : Thu May 19 2005 08:58 pm "Uenal Mutlu" <520001085531-0001@t-online.de> writes: > "Sergei Organov" wrote > > "Uenal Mutlu" writes: > > > > "Uenal Mutlu" writes: > > > > > > > > [...] > > > > > But if the data objects are independent of each other then it is more > > > > >efficient to let each have its own mutex. > > [...] > > > In this case IMO it does not make much sense to lock X, Y, Z > > > individually. It depends on what kind of access to the data you > > > want for your threads. It's an issue of the application logic. > > > > In the above I've skipped everything and left two consecutive statements of > > yours. Please read them... Done? > > > > Now I wonder are you actually one person or at least two?! Hopefully you > >don't in fact experience split personality :) > > No, I don't. But try to understand that these things are complex and > difficult to describe. > You on the other side are looking for simple answers to such complex > problems. No, I don't. It's you who are looking for simple solution to a complex problem and believe that recursive mutex is the answer, isn't it? > Try to understand my reply to Maciej Sobczak. There I've tried to > explain these cases along with examples. The right decision depends on > the access level to the data you want to grant each thread, and the > concurreny level among the threads. I didn't have any objection. What I'm saying is that your own statement cited above: > > > > > But if the data objects are independent of each other then it > > > > > is more efficient to let each have its own mutex. now appears to be plain wrong from your own point of view, right? -- Sergei. .