Ilmari Heikkinen
12/12/2005 10:43:00 AM
argh, okay, maybe third time's the charm:while (Thread.critical = true; @locked and @locked != Thread.current)sorry about thatOn 12/12/05, Ilmari Heikkinen <ilmari.heikkinen@gmail.com> wrote:> On 12/12/05, Ilmari Heikkinen <ilmari.heikkinen@gmail.com> wrote:> > The leaking Mutex problem showcased in the presentation page 27, I> > think the following change fixes it at least for #synchronize :>> forgot the #lock-part:>> def lock> - while (Thread.critical = true; @locked)> + while (Thread.critical = true; @locked != Thread.current) # go> ahead if we have the lock> @waiting.push Thread.current> Thread.stop> end> @locked = true> Thread.critical = false> self> end>>> Anything else I missed?>