line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
############################################################################
|
2
|
|
|
|
|
|
|
#
|
3
|
|
|
|
|
|
|
# Apache::Session::Lock::Null
|
4
|
|
|
|
|
|
|
# Pretends to provide locking for Apache::Session
|
5
|
|
|
|
|
|
|
# Copyright(c) 1998, 1999, 2000 Jeffrey William Baker (jwbaker@acm.org)
|
6
|
|
|
|
|
|
|
# Distribute under the Perl License
|
7
|
|
|
|
|
|
|
#
|
8
|
|
|
|
|
|
|
############################################################################
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package Apache::Session::Lock::Null;
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
1493
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
13
|
1
|
|
|
1
|
|
6
|
use vars qw($VERSION);
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
142
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$VERSION = '1.01';
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#This package is fake. It fulfills the API that Apache::Session
|
18
|
|
|
|
|
|
|
#outlines but doesn't actually do anything, least of all provide
|
19
|
|
|
|
|
|
|
#serialized access to your data store.
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new {
|
22
|
1
|
|
|
1
|
0
|
388
|
my $class = shift;
|
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
4
|
return bless {}, $class;
|
25
|
|
|
|
|
|
|
}
|
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
0
|
9
|
sub acquire_read_lock {1}
|
28
|
1
|
|
|
1
|
0
|
4
|
sub acquire_write_lock {1}
|
29
|
0
|
|
|
0
|
0
|
0
|
sub release_read_lock {1}
|
30
|
0
|
|
|
0
|
0
|
0
|
sub release_write_lock {1}
|
31
|
1
|
|
|
1
|
0
|
4
|
sub release_all_locks {1}
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1;
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=pod
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Apache::Session::Lock::Null - Does not actually provides mutual exclusion
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
use Apache::Session::Lock::Null;
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
my $locker = Apache::Session::Lock::Null->new;
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
$locker->acquire_read_lock($ref);
|
49
|
|
|
|
|
|
|
$locker->acquire_write_lock($ref);
|
50
|
|
|
|
|
|
|
$locker->release_read_lock($ref);
|
51
|
|
|
|
|
|
|
$locker->release_write_lock($ref);
|
52
|
|
|
|
|
|
|
$locker->release_all_locks($ref);
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Apache::Session::Lock::Null fulfills the locking interface of
|
57
|
|
|
|
|
|
|
Apache::Session, without actually doing any work. This is the module to use
|
58
|
|
|
|
|
|
|
if you want maximum performance and don't actually need locking.
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This module was written by Jeffrey William Baker .
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SEE ALSO
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
L
|