Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
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.
- 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.