Subj : Re: recursive mutexes To : comp.programming.threads From : Uenal Mutlu Date : Wed May 18 2005 10:16 pm "David Schwartz" wrote > > "Uenal Mutlu" wrote in message > > > You seem to not understand what I'm talking about. > > Do you understand this fact: "Recursive locking is defined for the current > > lock owning > > thread only"? > > Since you already have the lock you can do what ever you want since nobody > > else can change anything, but you can do! You simply increment it in > > Lock() > > and decrement it in Unlock(). Because it is safe because you already have > > it locked. > > Holy cow! Have you actually seen the way any recursive lock is actually > implemented? Sure, I've even researched and stress tested them, developed many variants myself. Otherwise I wouldn't discuss them. For code see my reply to doug. .