vendredi 10 juillet 2015

SQLAlchemy with SQLite: Multiple sessions to one database

I am using SQLAlchemy together with SQLite and multiprocessing. I was using one session and global lock for processes while using this session to avoid any race conditions especially while writing when the session locks the database. My question is: is it OK to have one session for writing and one for reading which doesn't require locking as the reading is not locking the database? Note: I am new to both SQLAlchemy and SQLite so it is possible that I missed something important so please feel free to enlighten me :)

Aucun commentaire:

Enregistrer un commentaire