TDcal::lock(3) | FreeBSD Library Functions Manual | TDcal::lock(3) |
TDcal::lock
—
use TDcal::lock;
$bool =
tdlock
($calref,
$lockfile, $lockmax);
$bool =
tdunlock
($calref,
$lockfile);
TDcal::lock
provides functions to perform locking of
TDcal
calendar resources.
tdlock
() acquires a lock for the calendar
indicated by $calref. $lockfile
names the locking file's name: the same $lockfile
argument must be used by all code wishing to access the same calendar
resource. Lock files are stored in the calendar's directory and should start
with a leading period ‘'.'
’ in order
that they are not confused with event data files. The
$lockmax argument gives the number of seconds that
tdlock
() should wait for the lock if it is already
held by another process. tdlock
() will check that
any process already holding a lock still exists and will break the lock if
such a process has already died.
tdunlock
() releases a lock previously
acquired from tdlock
().
tdlock
() and tdunlock
() return a
boolean $true or $false value to
indicate success or failure.
May 7, 2020 | FreeBSD 13.0-RELEASE |