views:

27

answers:

1

hello ,

i have a mysql tables that uses lock-write mechanism. the lock might go for too long (we're talking about 1-2 minutes here).

i had to make a check if the table is in use or not before the update is done (using beforeUpdate signal)

but after checking and returning that my table is in use , system hang until the other user unlocks the table . is it possible to prevent data from updating if the flag returned that the table is in use., im searching for a better way to handle this i don't want to re-implement the setData method since doing this is a pain. or if you have a good re-implementation for it . it will be very helpfull.
thanks in advance

A: 

Python threading: http://docs.python.org/library/thread.html You can create threads that wait until the table is finished and it should be negligible in system resources, also your end user wont have to wait for the system to respond to continue with a different task.

Prof.Ebral