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