Forum: Ruby on Rails What one *cannot* store in a session???

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.
54962ce5178e7b8e1a25304c9e563215?d=identicon&s=25 shodhan (Guest)
on 2006-02-11 11:02
(Received via mailing list)
Hi
Can someone tell me what i *cannot* store in a session.
For ex.
class TempController < ApplicationController


	def index
		session[:thread]=Thread.new do
		loop{}
		end
		render(:inline=>"abc")
		p 'post rendering'
		return
	end

end

does not work. although the print at the end of the method is executed,
the string 'abc' is not rendered. and when i check the session again
session[:thread] returns nil.
Can someone tell me what i am doing wrong, or what i need to read, to
understand what is going wrong
thanks
shodhan
3c61994644f5d19eb104fb36de8f46da?d=identicon&s=25 Tony Collen (Guest)
on 2006-02-11 15:44
(Received via mailing list)
Generally you can't store things that are not serializable.  In this
case, Threads ;)

Other things might be file handles, sockets, database connections, etc.

Tony
This topic is locked and can not be replied to.