Hi, I read the documentation about scoped sessions but l'm not sure to understand well what can be shared between threads and what cannot be.
Can we share a ScopedSession instance between threads ? Do we have to share only the sessionmaker and re-create a ScoppedSession in each threads ? I have a multi-threaded script witch operate on a database with the following pattern: Regards, F. -- maker = sessionmaker(autoflush=True, autocommit=True) DBSession = scoped_session(maker) DeclarativeBase = declarative_base() metadata = DeclarativeBase.metadata ... class Action1(Thread): def __init__(self): .... def start(self): while True: <some actions on database query flush etc...> class Action2(Thread): def __init__(self): ..... def start(self): while True: <some actions on the same database query flush etc...> -- -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.