SUMMARY: CONSTR | METHOD | DETAIL: CONSTR | METHOD |
Permission is granted to use this software under the same terms as Perl itself. Refer to the Perl Artistic License for details.
Unless otherwise noted, $self
is the object instance variable.
Constructor Summary |
---|
new($filename, $length, $protflags, $mmapflags)
mmap()'s using POSIX mmap() |
Method Summary |
---|
close()
Unmap the mmap()ed region |
lock()
Locks the mmap'ed region |
unlock()
Unlocks the mmap'ed region |
Constructor Details |
---|
new($filename, $length, $protflags, $mmapflags)
$filename
- $length
- optional
$protflags
- optional
$mmapflags
- optional
Method Details |
---|
close()
lock()
NOTE: This lock is not sufficient for multithreaded access control, but may be sufficient for multiprocess access control.
Also note that, due to flock() restrictions on some platforms, the type of lock is determined by the protection flags with which the mmap'ed region was created: if only PROT_READ, then shared access is used; otherwise, an exclusive lock is used.
unlock()