rubyonrailsin

A Ruby and Rails talk

Thursday, March 25, 2010


[Rails] Is every request one thread?

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

I am asking because the documentation in ConnectionPool states that

"The basic idea is that each thread checks out a database connection
from the pool, uses that connection, and checks the connection back
in."

I would like to check out a connection in a before_filter, and check it
back in in an after_filter of a request, because I need to be sure to
use the same connection for the whole lifecycle of the request (I need
to set a session variable that is read by some views that use it as
prameter).

Can someone who knows confirm?

Thanks!
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive