![]()
|
|||
|
|
|||
| NRAO Home > CASA > CasaDocument | |||
1.1.1 Acquire a lock on the image
Description
This function can be used to acquire a Read or a Read/Write lock on the
image file. It is not of general user interest.
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 haslock.
Arguments
| Inputs |
| ||
| writelock |
| Acquire a read/write (T) or a readonly (F) lock
| |
| allowed: | bool |
|
| Default: | false |
|
| nattempts |
| Number of attempts, ¿ 0. Default is unlimiited.
| |
| allowed: | int |
|
| Default: | 0 |
|
Example
"""
# print "\t----\t lock Ex 1 \t----" ia.maketestimage(’xx’, overwrite=true) ia.lock(writelock=T) ia.unlock() ia.lock(writelock=F) ia.close(remove=true) # """ |
This acquires a read/write lock on the file. Then we unlock it and acquire a readonly lock.
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2007 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Updated daily during alpha development.