Dave Thomas wrote: >> To be honest, I'm not sure autoload is really even possible to make >> safe in the presence of threads...the design of it may be inherently >> incompatible. But I'm willing to talk through some possibilities and >> see what we can come up with. > > Yeah--you'd need to make require transactional somehow. Yeah, that's essentially it (though it's more specific to autoload). You'd need to lock the constant under autoload in such a way that other threads would block until autoloading completed. And unless it were a single global lock for all autoload logic, there's a strong potential for deadlock if two threads encounter opposing constants at the same time. > Stupid question: does anyone actually use autoload? They do, but they probably shouldn't. It's broken.