[sqlalchemy] Re: Setup to best support multi-threads

2011-10-31 Thread Paul
I'm getting the error sqlalchemy.exc.ProgrammingError: (ProgrammingError) SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 5808 and this is thread id 7936 None None with my current setup, I'm not sure what I've done wrong. I set up

Re: [sqlalchemy] Re: Setup to best support multi-threads

2011-10-31 Thread Michael Bayer
a little programming puzzle.The scoped_session() is a thread local registry which links a Session to the current thread. When you say self.session = Session(), you're invoking the registry, generating a Session local to the current thread, then assigning it to a local variable.In fact