Forum: Ruby on Rails Question about controller threading

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Pat M. (Guest)
on 2007-02-06 09:56
(Received via mailing list)
Rails is single-threaded, so I don't have to worry about changing
stuff around when a request is made, right?  I'm going to be using
ActiveResource, but don't know ahead of time what the class's site
will be.  So basically on every request I'll be changing it (if I need
to).  Is it okay to do that?  Once a request is made, no other
requests can use the process...so as long as I update MyARes.site I
should be okay.  Is there a better all around way to do it?

Pat
Dan M. (Guest)
on 2007-02-06 22:58
(Received via mailing list)
On Feb 6, 2:55 am, "Pat M." <removed_email_address@domain.invalid> wrote:
> Rails is single-threaded, so I don't have to worry about changing
> stuff around when a request is made, right?  I'm going to be using
> ActiveResource, but don't know ahead of time what the class's site
> will be.  So basically on every request I'll be changing it (if I need
> to).  Is it okay to do that?  Once a request is made, no other
> requests can use the process...so as long as I update MyARes.site I
> should be okay.  Is there a better all around way to do it?
>
> Pat

Seems like a fine approach to me, although I am not very familiar with
ARes.  Jamis just posted about setting the timezone per request, which
has the same approach:
http://weblog.jamisbuck.org/2007/2/2/introducing-tztime

Dan M.
This topic is locked and can not be replied to.