summaryrefslogtreecommitdiff
path: root/fml/lib/File/SimpleLock.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-01-13 05:57:40 +0000
committerfukachan <fukachan>2002-01-13 05:57:40 +0000
commita86c9d7defdec55c0079cd01a97d9a21563b8f2a (patch)
tree363c1e8b8e802a52f7f8832d7a0183452cb9384d /fml/lib/File/SimpleLock.pm
parent54556e99fdde4b6744c7925444afb18649dbd7ef (diff)
downloadfml8-a86c9d7defdec55c0079cd01a97d9a21563b8f2a.tar.gz
fml8-a86c9d7defdec55c0079cd01a97d9a21563b8f2a.tar.bz2
fml8-a86c9d7defdec55c0079cd01a97d9a21563b8f2a.zip
clean up comments, update copyright
Diffstat (limited to 'fml/lib/File/SimpleLock.pm')
-rw-r--r--fml/lib/File/SimpleLock.pm24
1 files changed, 22 insertions, 2 deletions
diff --git a/fml/lib/File/SimpleLock.pm b/fml/lib/File/SimpleLock.pm
index 8ae51875..c9bac8ef 100644
--- a/fml/lib/File/SimpleLock.pm
+++ b/fml/lib/File/SimpleLock.pm
@@ -1,8 +1,8 @@
#-*- perl -*-
#
-# Copyright (C) 2000,2001 Ken'ichi Fukamachi
+# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
#
-# $FML: SimpleLock.pm,v 1.8 2001/05/28 16:17:14 fukachan Exp $
+# $FML: SimpleLock.pm,v 1.9 2001/12/22 09:21:11 fukachan Exp $
#
package File::SimpleLock;
@@ -51,6 +51,10 @@ sub LOCK_NB {4;}
sub LOCK_UN {8;}
+# Descriptions: standard constructor.
+# Arguments: OBJ($self) HASH_REF($args)
+# Side Effects: none
+# Return Value: OBJ
sub new
{
my ($self) = @_;
@@ -60,6 +64,10 @@ sub new
}
+# Descriptions: lock
+# Arguments: OBJ($self) HASH_REF($args)
+# Side Effects: none
+# Return Value: 1 or 0
sub lock
{
my ($self, $args) = @_;
@@ -69,6 +77,10 @@ sub lock
}
+# Descriptions: unlock
+# Arguments: OBJ($self) HASH_REF($args)
+# Side Effects: none
+# Return Value: 1 or 0
sub unlock
{
my ($self, $args) = @_;
@@ -79,6 +91,10 @@ sub unlock
+# Descriptions: try flock(2) for $file
+# Arguments: OBJ($self) STR($file)
+# Side Effects: flock for $file
+# Return Value: 1 or 0
sub _simple_flock
{
my ($self, $file) = @_;
@@ -108,6 +124,10 @@ sub _simple_flock
}
+# Descriptions: try unlock by flock(2) for $file
+# Arguments: OBJ($self) STR($file)
+# Side Effects: flock for $file
+# Return Value: 1 or 0
sub _simple_funlock
{
my ($self, $file) = @_;