1Pinto::Locker(3)      User Contributed Perl Documentation     Pinto::Locker(3)
2
3
4

NAME

6       Pinto::Locker - Manage locks to synchronize concurrent operations
7

VERSION

9       version 0.14
10

DESCRIPTION

METHODS

13   lock
14       Attempts to get a lock on a Pinto repository.  If the repository is
15       already locked, we will attempt to contact the current lock holder and
16       make sure they are really alive.  If not, then we will steal the lock.
17       If they are, then we patiently wait until we timeout, which is about 60
18       seconds.
19
20   unlock
21       Releases the lock on the Pinto repository so that other processes can
22       get to work.
23
24       In many situations, a Pinto repository is a shared resource.  At any
25       given moment, multiple processes may be trying to add distributions,
26       remove packages, or pull files from a mirror.  To keep things working
27       properly, we can only let one process fiddle with the repository at a
28       time.  This module manages a lock file for that purpose.
29
30       Supposedly, this does work on NFS.  But it cannot steal the lock from a
31       dead process if that process was not running on the same host.
32

AUTHOR

34       Jeffrey Ryan Thalhammer <jeff@stratopan.com>
35
37       This software is copyright (c) 2015 by Jeffrey Ryan Thalhammer.
38
39       This is free software; you can redistribute it and/or modify it under
40       the same terms as the Perl 5 programming language system itself.
41
42
43
44perl v5.34.0                      2021-07-22                  Pinto::Locker(3)
Impressum