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.makecomplex - Function Up: image - Tool Previous: image.ispersistent - Function


image.lock - Function



Package general
Module images
Tool image


Acquire a lock on the image


Synopsis
lock(write, nattempts)



Arguments

write in Acquire a read/write (T) or a readonly (F) lock
    Allowed: T or F
    Default: T
nattempts in Number of attempts
    Allowed: Non-negative integer
    Default: Forever


Returns
T or fail



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.



Example
- im := image('xx')
- im.lock(write=T)
- im.unlock()
- im.lock(write=F)
This acquires a read/write lock on the file. Then we unlock it and acquire a readonly lock.





next up previous contents index
Next: image.makecomplex - Function Up: image - Tool Previous: image.ispersistent - 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