|NRAO Home > CASA > CASA Toolkit Reference Manual||
image.haslock - Function
1.1.1 Does this image have any locks set?
This function can be used to find out whether the image has a read or a write lock set. It is not of general user interest. It returns a vector of Booleans of length 2. Position 1 says whether a read lock is set, position 2 says whether a write lock is set.
In general locking is handled automatically, with a built in lock release cycle. However, this function can be useful in scripts when a file is being shared between more than one process. See also functions unlock and lock.
print "\t----\t haslock Ex 1 \t----"
This example acquires a read/write lock on the file and then unlocks it
and acquires just a read lock.
More information about CASA may be found at the CASA web page
Copyright © 2016 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense