Venkatesh
unread,Jun 6, 2008, 3:14:53 PM6/6/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlalchemy
Hello,
I'm trying to use SQLAlchemy for my Python project which is a multi-
threaded application. While I've had good success in performing CRUD
operations with a single thread, I'm having a lot of trouble when I
start using multiple threads.
Can anybody give a simple example of using the Session in a multi
threaded context? I'm looking for a simple example like this:
class User(object):
- this is the User class which has the users_table
class ThreadOne
- open a thread local session
- perform operations on user objects
- save the user object
class ThreadTwo
- open another thread local session
- connect to the same db, and get user objects
- modify the user objects
- save this to the db
Please help.
thanks,
Venkatesh.