Dave Thomas wrote:
> Why not use the same lock that's used by require? The two are clearly 
> related, and if there's a require in progress, you'd want to suspend 
> autoload until it has finished, and the result of the require might 
> affect the behavior of the autoload.

It probably could use the same lock; the trickier bit is that in between 
encountering the autoload and requiring the file there's already state 
changes happening. So I think we still need to ensure the autoload 
marker is mutated under lock as well.

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.