Frederick Cheung wrote:
> On May 26, 10:20�am, Sudhi Kulkarni <[email protected]>
> wrote:
>> session[:executing] it is not updated to "done". Is there a problem if I
>> try to update session variable in a different thread?
>>
>
> If this ends up setting the session after rails has closed out the
> session (ie pushed it back into the db, or sent the cookie back to the
> client) then this won't work.
>
> Fred
How do I know whether rails has closed out and pushed the cookie back to
client? If I add a join before exiting from the action something like
below
def execute
t1 = Thread.new { #code
session[:executing] ="done";
}
t1.join
end
In the above case the session variable is updated. How would I get this
working if I want the session to be updated sometime later and still not
in that function?
Regards,
Sudhindra
--
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 [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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---