From: Jim Weirich Date: 2008-12-04T03:57:34+09:00 Subject: [ruby-core:20269] Re: autoload and concurrency On Dec 3, 2008, at 1:17 PM, Brent Roman wrote: > +1 > > Why can't that "special value" be a kind of Mutex? > Each thread tries to aquire it. The first succeeds, later threads > block. > As the later threads unblock, each redundantly "requires" the files > needs > for the constant, > which have just been loaded by the first thread, so all the later > threads > quickly give > up the Mutex and continue. How do you prevent deadlocks? -- -- Jim Weirich -- jim.weirich@gmail.com