Pinto::Locker - Manage locks to synchronize concurrent operations
Attempts to get a lock on a Pinto repository. If the repository is already locked, we will attempt to contact the current lock holder and make sure they are really alive. If not, then we will steal the lock. If they are, then we patiently wait until we timeout, which is about 60 seconds.
Releases the lock on the Pinto repository so that other processes can get to work.
In many situations, a Pinto repository is a shared resource. At any given moment, multiple processes may be trying to add distributions, remove packages, or pull files from a mirror. To keep things working properly, we can only let one process fiddle with the repository at a time. This module manages a lock file for that purpose.
Supposedly, this does work on NFS. But it cannot steal the lock from a dead process if that process was not running on the same host.
Jeffrey Ryan Thalhammer <firstname.lastname@example.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Imaginative Software Systems.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.