Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: image.histograms - Function Up: image - Tool Previous: image.hanning - Function


image.haslock - Function



Package general
Module images
Tool image


Does this image have any locks set ?


Synopsis
haslock()


Returns
Vector of Bool or fail


Description

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.



Example
- im := image('xx')
- im.lock(write=T)
- im.haslock()
[T T]
- im.unlock()
- im.haslock()
[F F]
- im.lock(F)
- im.haslock()
[T F]
This acquires a read/write lock on the file and then unlocks it and acquires just a read lock.





next up previous contents index
Next: image.histograms - Function Up: image - Tool Previous: image.hanning - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01