From: Caleb Clausen Date: 2007-06-12T05:40:36+09:00 Subject: Re: Synchronized attr_accessor On 6/11/07, Nasir Khan wrote: > What is the race condition you are talking about in the first snippet above? > And why did you change it to have two identical unless's one after the other > in the second snippet? > Note the unless is checking for @__ms_lock in *both* the unless's. Uh-oh, I misunderstood your code. I didn't notice that you had unless inside the lock too. I apologize. I wasn't even aware of this issue MenTaLguY is talking about. I would have thought that your second version worked, (as indeed it does in 1.8, although this behavior isn't advertized) although I still prefer my explicit initialization beforehand for something like this..... however, is that even a valid solution? After reading MenTaLguY's link I'm not so sure...