Hi!

Is it possible to use session in created thread in my action, like:

...
from pylons import session
import thread
...

class UsersController(BaseController):
    def _check_user(self, user):
        # do something with session object
        ...

    def some_action(self, user):
        ...
        thread.start_new_thread(self._check_user, (user,))
        ...

When I try to do it this way I received exception:

TypeError: No object (name: session) has been registered for this
thread

Do I need to register session in thread? How? :)

I will create thread because I don't want to wait for some code to
finish job.

Thanks in advance for your help :)

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to