Hello,

I am using SQLAlchemy in a GUI app. It's is a multi-window app and each window edits and saves different data entities. Currently, all windows are running on the same thread. Is there any way I can use a separate unit of work for the data operations of each window (so when I do a uow().commit() on a editor it doesn't affect edits happening on other windows)? The windows are not passing information between them, but a given window may need to tell other windows to reload certain entities once changes have been saved. What is the best approach to solving this type of problem? The following are ideas I came up with:

1. Put the data access code for each editor on a separate thread
2. Switch the active UOW each time a window gains focus (error prone, messy) 3. Create a UOW for each window and (somehow) pass it to all mapper/ objectstore operations for that editor (is this possible)?

Are there other ways? Better ways?

Thanks

~ Daniel


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to