> Of the top of my head I think you need to use with_lockmode in SQLAlchemy to > create a query that locks the rows in the database for updating. I'm not > sure what DB's support this on a per row basis (you may end up locking an > entire table, Postgres does row locking but I don't think MySQL does). > > The current in_use=True and commit isn't going to work with concurrent > users.
Hi, thanks for that - I am indeed using MySQL without row-level locking, and table-level is not an option. Why do you say that the in_use example I give wouldn't work? Barring race conditions of simultaneous locking, writing a lock to the DB and checking it before use should work... (My actual code writing timestamps and unique IDs for lock info, so it mitigates the race condition.) Cheers, James -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

