Subj : Re: Challenge: Multithreading & Synchronization To : comp.programming.threads From : Uenal Mutlu Date : Thu May 19 2005 03:35 pm "Sergei Organov" wrote > "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. > > Well, in a 3D-vector coordinates X, Y, and Z are independent in the same > sense your data items are independent. The question is: is it more > efficient to let each coordinate 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. There are usually many ways to solve a problem, just chose the right one you like and know best. .