> Rails should compile and cache all the templates on boot. This means
> before any dispatch threads are even run.


I think this is a great goal although it not necessary to solve the race
condition in template compilation.


> BTW, just adding mutexes in patch by patch isn't really going work.
> There is already a mutex that wraps the dispatch by mongrel and
> another that AP wraps the dispatch w/. (We need to drop the one in the
> mongrel handler). I  suggest working on this stuff in a different
> branch (aka my thread_safe branch :) until we've got it done.
>

I would agree on dropping mongrel mutex since AP protects the dispatch
already, except for... do some older versions of rails not have this mutex?
In which case we'd have a problem.

What I was planning on doing is attacking thread-safety on a case by case
basis.  We can leave the AP dispatch mutex until all known thread safety
problems are solved, at which point we can remove it.  Is there an issue
with having redundant mutexes until that point?


>
> I think the bigger problem is getting your app to be threadsafe. We
> should look into adding some helpful development features to find non
> threadsafe code. I added a feature to my branch that warns you if you
> try to modify class variables through a caccessor if it is not safe. I
> made a "Thread.current.safe?" that checks if you are 1) In a thread
> and 2) not inside a mutex. (all highly experimental!)
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to