Most data written are Tables (except for FItsfile, ASDM and text files)
If you are using the default way of accessing these data objects to
read/write most ...its quasi certain you are using
So the way is to release the lock...all the accessor classes to the
data objects are either inherited from Table or have methods that
give you access to the Tableobject underneath and thus Table methods.
My recommendation: release the lock when you are done with the Table
object (because casapy is inherently a multiprocess system and no
longer a single process one) or talk to the required module boss to
implement a friendlier release of the lock.
Jonas: It does not seem like a solution, neither in oo-theory or in practise, to put unlock calls all over the client code. The code that locked the table should also be responsible for unlocking it (also if that involves keeping count of how many time the table was already locked and unlocked).