Reputation: 735
For example if I assign Thread.current[:user] in the beginning of some requests, do I have to clean it up at the end of those request? Is this different between different versions of Rails or different server software such as Passenger, Mongrel and JRuby + Glassfish?
Upvotes: 1
Views: 80
Reputation: 735
Hongli Lai (http://groups.google.com/group/phusion-passenger/msg/8c3fc0ba589726bf) says that mongrel spawns a new thread for every request but all other app servers process subsequent requests in the same thread. Cleaning up Thread.current in the beginning of every request (or not using it) seems to be the best way to deal with it.
Upvotes: 1